View Full Version : List YUV coefficients for different encoders !
TuRiSOft
7th February 2006, 19:33
I recently started using the ColorMatrix AviSynth filter in my encodings and I found it very useful (also a bit slowing my encodes , but quality is my point , not speed).
I'd like to point out what coefficients every encoder needs to be feed with , it could be useful for everyone using that filter. I only know that CCE and AQE uses "Rec.709" while HC uses "Rec.601" . What about QUENC and ProCoder ?
Rumbah
7th February 2006, 22:55
I just encoded a file with HC and noticed that DGindex says it is Rec.709.
Wilbert
9th February 2006, 15:04
QUENC and ProCoder
QuEnc uses fcc, just like TMPGEnc does. Dunno about ProCoder.
TuRiSOft
9th February 2006, 15:18
QuEnc uses fcc, just like TMPGEnc does. Dunno about ProCoder
@Wilbert : Do you mean we got to use Rec.709 for Quenc too , isn't it ?
Another question : How can we do to know what coefficients one encoder needs to be feed with? Is it enough to encode a small clip ,then use the [PREVIEW] function of DGIndex to say what it needs ? And if so , why does HC needs Rec.601 and its output is reported to be Rec.709 compliant ?
Thank you very much!!!
TuRiSOft
9th February 2006, 22:39
Ok , i've made some tests. I picked a small clip from an original DVD wich DGIndex said uses "Rec.709" , then I encode it with CCE 2.66.01.07 , QuEnc 0.61 , HC 0.17 and ProCoder 2.0. For each encoder I made an m2v with no conversion , one m2v with Rec.709 conversion and one m2v with Rec.601 conversion. After that I made a simple avs script which loads all the m2v made by the same encoder and interleaved them , so I can see in sequence one frame from the original one (directly from the DVD) , one frame from the non converted one , one frame from the Rec.709 one and one frame from the Rec.601 one(always the same frame). I used the ColorYUV(Analyze=true) filter to see some values on the screen , but it's clearly visible (also w/out the filter values printed on) that the Rec.709 Conversion is the better one. I noticed that in every Rec.601 clip the colors are always not true , they seem to be too lighted , while in the original Picture they are lightened , and also very similar between the Non Converted and the Rec.709 ones. Here is the script I used for encoding :
LoadPlugin("....\DGDecode.dll")
Mpeg2source("...\test.d2v",idct=7)
trim(500,1000) adding the conversion string ColorMatrix(mode0"Rec....->Rec....",hints=true,opt=0)between the 2nd and 3rd line when needed.
Here is the script I used for comparison :LoadPlugin("....\DGDecode.dll")
a=Mpeg2source("...\test.d2v",idct=7).Subtitle(x=10,Y=20,"Original")
b=Mpeg2source("...\test_noConv.d2v",idct=7).Subtitle(x=10,Y=20,"No Conversion")
c=Mpeg2source("...\test_601.d2v",idct=7).Subtitle(x=10,Y=20,"Rec.601")
d=Mpeg2source("...\test_709.d2v",idct=7).Subtitle(x=10,Y=20,"Rec.709")
Interleave(a,b,c,d).ColorYUV(Analyze=true)
Basing upon my test I understand I must always use mode="Rec.601->Rec.709" for my ColorMatrix string , no matter whatever encoder I use. I'd like Wilbert to confirm that or to show me where I'm wrong , cause I feel real confused !!!
Wilbert
9th February 2006, 23:24
@Wilbert : Do you mean we got to use Rec.709 for Quenc too , isn't it ?
No, fcc is appr. equal to Rec.601.
Another question : How can we do to know what coefficients one encoder needs to be feed with? Is it enough to encode a small clip ,then use the [PREVIEW] function of DGIndex to say what it needs ?
Yes. Another possibility is the script
Mpeg2source("F:\TestStreams\avs\AguileraGrammies.d2v", info=1)
which prints it on your screen.
And if so , why does HC needs Rec.601 and its output is reported to be Rec.709 compliant ?
Who says it needs Rec.601 as input?
Ok , i've made some tests. I picked a small clip from an original DVD which DGIndex said uses "Rec.709" , then I encode it with CCE 2.66.01.07 , QuEnc 0.61, HC 0.17 and ProCoder 2.0. For each encoder I made an m2v with no conversion , one m2v with Rec.709 conversion and one m2v with Rec.601 conversion.
Hmm. For QuEnc you should use Rec.601:
# Rec.709 source.
ColorMatrix(clip, mode="Rec.709->Rec.601")
Not sure what you claim here. If you apply a "Rec.601->Rec.709" on a Rec.709 it will never look like the original. Perhaps i'm misunderstand you.
Btw, if you encode something with QuEnc, what does
Mpeg2source("QuEnc-source.d2v", info=1)
print on your screen? Indeed fcc (= Rec.601)?
TuRiSOft
10th February 2006, 17:48
....Btw, if you encode something with QuEnc, what does
Mpeg2source("QuEnc-source.d2v", info=1)
print on your screen? Indeed fcc (= Rec.601)?
No, ITU BT.709 !!! (really , it's the result of every MPEG-2 encoder I used against that clip or at least Mpeg2Source(info=1) says so!!!)
I just read all the Colormatrix thread (http://forum.doom9.org/showthread.php?t=82217) and I understood that in case of Rec.709 source and if I want to feed the encoder with Rec.709 coefficients I *MUST* not use colormatrix because it changes the colorimetry , or at least I have to use it with hints=true.
Now , please help me clarify wich encoder needs to be fed with wich type of Colorimetry info , because this is very confusing me (I'm seriously thinking about no more using of this filter).
At the moment I suspect that these ones are the right usages :
----------Source_Colorimetry------------------Encoder-------------------Conversion_to_Use
----------Rec.709-----------------------------CCE-----------------------No Conversion or Rec. 601 -> Rec. 709 with hints=true
----------Rec.601-----------------------------CCE-----------------------Rec.601->Rec.709
----------Rec.709-----------------------------HC------------------------Rec. 709 -> Rec. 601
----------Rec.601-----------------------------HC------------------------No Conversion or Rec.709->Rec.601 with hints=true
.... and please feel free to correct me.
But the point is : If i want to use ProCoder or QuEnc what kind of conversion do I need and in wich case ?
Boulder
11th February 2006, 12:46
HC uses Rec.709 so it's the same as CCE.
TuRiSOft
11th February 2006, 12:52
HC uses Rec.709 so it's the same as CCE.
Thank you Boulder ... One Point Cleared !!!
1 Q 4 U -> Where or how did you discovered this ? As you can see I'm looking for a method on how to determine Coefficients for each encoder !!!
Boulder
11th February 2006, 13:01
What I've done is usually encode a short clip with an MPEG2 encoder, then load the file in DGIndex and see what it reports. Besides, I think HC's colorimetry was discussed some time ago as at first DGIndex showed an incorrect result but now it displays it correctly.
One quite foolproof method is to take a video file you know to be Rec.709 (most DVDs), encode it and compare the encoded clip to the original. If it differs noticably, the encoder uses Rec.601 coeffs, otherwise Rec.709.
Wilbert
11th February 2006, 15:59
@TuRiSOft,
I checked QuEnc for you. Indeed it uses Rec.709 and the docs should be corrected :) TMPGEnc uses FCC (=Rec.601). Thus:
Source_Colorimetry------------------Encoder-------------------Conversion_to_Use
Rec.709----------------------------CCE/HC/QuEnc-------------No Conversion or 'Rec.601 -> Rec.709 with hints=true'
Rec.601----------------------------CCE/HC/QuEnc-------------Rec.601->Rec.709 or 'Rec.601 -> Rec.709 with hints=true'
Rec.709----------------------------TMPGEnc------------------Rec.709 -> Rec.601 or 'Rec.709 -> Rec.601 with hints=true'
Rec.601----------------------------TMPGEnc------------------No Conversion or 'Rec.709 -> Rec.601 with hints=true'
TuRiSOft
11th February 2006, 16:36
@TuRiSOft,
I checked QuEnc for you. Indeed it uses Rec.709 and the docs should be corrected :) TMPGEnc uses FCC (=Rec.601). Thus:
Source_Colorimetry------------------Encoder-------------------Conversion_to_Use
Rec.709----------------------------CCE/HC/QuEnc-------------No Conversion or 'Rec.601 -> Rec.709 with hints=true'
Rec.601----------------------------CCE/HC/QuEnc-------------Rec.601->Rec.709 or 'Rec.601 -> Rec.709 with hints=true'
Rec.709----------------------------TMPGEnc------------------Rec.709 -> Rec.601 or 'Rec.709 -> Rec.601 with hints=true'
Rec.601----------------------------TMPGEnc------------------No Conversion or 'Rec.709 -> Rec.601 with hints=true'
I've never had doubt!!! This forum is the greatest !!! Thank you all !!!
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.