Log in

View Full Version : bt.709 and CCE


Pages : 1 [2]

jdobbs
3rd November 2007, 00:23
It means "if the sequence_display_extension() isn't there -- your guess is as good as mine." they were just afraid to write that into the spec. ;)

It also says this:

NOTE 2 – In applications which may have signals with more than one set of colour primaries, transfer characteristics, and/or matrix coefficients, it is recommended to transmit a sequence display extension with colour_description set to one, and to specify the appropriate values for the colorimetry parameters.

fjhdavid
3rd November 2007, 01:26
look at this address even if they are talking about SDTV:

(sigmadesigns is also a wellknown decoder chip maker used in a lot of DVD player)

http://www.sigmadesigns.com/public/Support/chromaticity.html

But for Wilbert an Jdobbs, I read also ITU-T Rec.H262 (2000 E)".
The application should be for example SD (or HD), or SD TV, or HD TV, as the player would recognize by the height and width which application the mpeg2 stream are talking about?
It could be the same with PAL and NTSC as the player would recognize the application with the refresh rate (25hz and 30hz)?

PS: I tested DGindex and it is a 709 compliant DVD player...

hank315
3rd November 2007, 16:36
In the case that sequence_display_extension() is not present in the bitstream or colour_description is zero the matrix coefficients are assumed to be implicitly defined by the application.
This is a mess, not a standard anymore :(

BTW, thanks for the ITU link.

Suppose you original video is 601, and you feed it as YCbCr to CCE. CCE doesn't add the "sequence display extension" field to the resulting MPEG-2 file. Hence IF (*) we follow the MPEG-2 specs, Rec.709 coefficients should be assumed upon display, and the displayed clip has wrong colors.
But assuming that you are correct by your statement that PowerDVD uses Rec.601 upon display, then your encoding will look the same as your original.
True, but what if the "sequence display extension" with 601/709 flags is added to the stream.

I just added this header to HCenc to see what happens for different input/output combinations, the next table shows the RGB values for the red, green and blue colorbars using PowerDVD.

input output red green blue
601 601 RGB=187, 0, 0 RGB= 2,187, 2 RGB= 1, 0,187
601 709 RGB=187, 0, 0 RGB= 2,187, 2 RGB= 1, 0,187
709 601 RGB=171, 0, 2 RGB= 17,220, 8 RGB= 1, 0,179
709 709 RGB=171, 0, 2 RGB= 17,220, 8 RGB= 1, 0,179
Seems DVD has its own rules and is not a subset of the MPEG2 standard regarding colorimetry, PowerDVD always outputs 601 regardless if the stream is flagged 601 or 709, the info in the sequence display extension is ignored.

Now lets see how DGIndex handles it:
input output red green blue
601 601 RGB=188, 1, 1 RGB= 3,188, 3 RGB= 1, 1,188
601 709 RGB=204, 19, 0 RGB= 0,160, 0 RGB= 0, 12,195
709 601 RGB=172, 0, 2 RGB= 18,221, 9 RGB= 1, 0,179
709 709 RGB=188, 1, 1 RGB= 4,189, 3 RGB= 0, 1,187
According to the MPEG2 standard this is correct, the info in the sequence display header is read and processed.

What does this mean for DVD-RB using CCE?
IMHO nothing, DVD content already has 601 characteristics, CCE encodes the YUY planes to YV12 planes and doesn't write the sequence display header so DGIndex correctly sees it as 709 but DVD players will ignore it and use 601 for the conversion.
However if you use Colormatrix to convert the DVD from 709 to 601 you will end up with the wrong colorimetry, and DGIndex will still report it as 709...

For those who are interested the testfiles used can be downloaded here (http://rapidshare.com/files/67173505/colors.zip.html)

jdobbs
3rd November 2007, 16:50
So here are the questions, since the standard can't apparently be trusted:

1. Can we assume DVDs with no sequence_display_extension() are Rec.709 or Rec.601?

2. What conversion is DGDECODE doing when it frame serves it to HC or CCE?

3. Why is it that when I do see sequence_display_extension() used on a DVD it is always used to specify Rec.601? It would at least give you the impression that the default is other than Rec.601, wouldn't it?

Since DVD-RB scans the file and creates the D2V file itself, I could very easily make the D2V default to Rec.601 -- but is that right?

Sigh...

hank315
3rd November 2007, 17:32
As long as nobody here has the DVD specification it's all speculation...

1. Can we assume DVDs with no sequence_display_extension() are Rec.709 or Rec.601?My guess is all DVDs are rec.601, there's too much info on the Inet saying SD is 601.
The testfiles also show wrong colorimetry using 709 as input.

2. What conversion is DGDECODE doing when it frame serves it to HC or CCE?As far as I can see in the code: none.
The sequence display info is only parsed, not processed.

3. Why is it that when I do see sequence_display_extension() used on a DVD it is always used to specify Rec.601? It would at least give you the impression that the default is other than Rec.601, wouldn't it?Sounds logical indeed but PowerDVD (WMP does the same) seems to ignore the settings in the sequence display header completely, outputting the header seems just a waste of bits?

45tripp
4th November 2007, 00:27
My guess is all DVDs are rec.601,
I agree


Sounds logical indeed but PowerDVD (WMP does the same) seems to ignore the settings in the sequence display header completely, outputting the header seems just a waste of bits?
I think you'll find all pc players will do the same,
use 601, ignore headers.


2. What conversion is DGDECODE doing when it frame serves it to HC or CCE?

it does nothing, the encoders do nothing.


3. Why is it that when I do see sequence_display_extension() used on a DVD it is always used to specify Rec.601? It would at least give you the impression that the default is other than Rec.601, wouldn't it?
It gives me the impression that it's an encoder error not setting the display extension. A shortcoming.

btw, restream can add matrix coeffs to a stream,
it sets to I470.
Don't know if there's a tool to set the header coeffs to 709.
I like that Hank added the feature to add the header in a test version of HC,
I'm sure it will make it through to the next HC.

anyway,
i think it's good to know what behaviour to expect with conversions to rgb so basically i gave this answer to the op:

consider 4 sources:

A
colorbars(720,480)
killaudio()
converttoyv12()
trim(0,120)

Feed to HC/CCE/mencoder, get mpeg2, 601 coeffs used.
No sequence_display_extension present.

B
Take stream A and use restream to add sequence_display_extension with colour,
restream sets matrix coeffs to 'I470'.


C
colorbars(720,480)
killaudio()
converttoyv12(matrix="rec709")
trim(0,120)

Feed to HC/CCE/mencoder, get mpeg2, 709 coeffs used.
No sequence_display_extension present.

D
the same as C but set matrix coefficients in header to 709.
Like I said I don't know of a tool to do it,
but Hank's colorbar input709to709output stream linked to above fits the bill.

slap the 4 sources on a disk or use them for input to your apps.

Scenario 1:
Mpeg2 is converted to rgb using 601 always.
Source A = Normal (N) ; B = N ; C = Red Push (RP) ; D = RP

Scenario 2:
Mpeg2 is converted to rgb respecting the header,
in the absence of the header 709 is assumed.
A= Green Push (GP) ; B = N ; C = N ; D = N

Scenario 3:
Mpeg2 is converted to rgb respecting the header,
in the absence of the header 601 is assumed.
A = N ; B = N ; C = RP ; D = N

Scenario 4:
Mpeg2 is converted to rgb using 709 always. (nicely hypothetical)
A = GP ; B = GP ; C = N ; D = N


That way you know what's happening on the end part.
and effectively what to do before you get there.

If Scenario 2 is actually the standard,
and is abided to,
then what CCE (and other encoders) does is wrong by not setting
color matrix coeffs in the header,
and I would run them through restream to add a header.

As for knowing what you are working with...
I'd treat dvds with no header as though they are 601.
Of course you can just wing it visually, deciding if you're ok,
or if you've been pushed either red or green,
and revert with colormatrix.

anyway,
that's what I think.

gl

fjhdavid
4th November 2007, 01:43
I am happy that Hawk315 found same results as my post 37 with the RGB values, even if Hawk has been able to do more things than me thanks to its knowledge, and as I said in my post 41: "CCE does NOT do colorimetry conversion and is expecting nothing as input"

As I said many many times in this thread, we don't care about the norm (and maybe we never know if there is a followed norm) but we must be pragmatic:

Even if assuming that 709 DVD were true, NO DVD players on the market (as long as I know) would play the 709 DVD without chromacity error (as DVD players use only two or three different chip decoder that are 601 - see my posts)), and ONLY Dgindex for PC (as I know (see my post 52)) would be able to read the re-encoded 709 DVD!!!

IT IS NOT an EVIDENCE of something, it is a FACT.

Now, everyone can do what he wants but it is a non sense to use a colormatrix (bt 601->bt709) with 601 DVD.

I know my english is bad (someone else, like Manono can write it), but I think we need a sticky post about this subject.

But even if there is nothing more on the subject, lets me thank, one more time, Jdobbs for its work, as I used it everyday.

kumi
4th November 2007, 01:51
we don't care about the norm (and maybe we never know if there is a norm) but we must be pragmatic:I agree.


NO DVD players on the market (as long as I know) would play the 709 DVD without chromacity error, and ONLY Dgindex for PC (as I know see my post 52) would be able to read the re-encoded 709 DVD!!!

It is not an evidence of something, it is a fact.I'm not sure why you are so sure about this. Can you explain?



Since the standards are murky, what if we blind test the users on Doom9? Carefully author a DVD with a few test patterns, have users view them, and then answer some questions about their visual impressions. The questions would be designed to determine which of Immersion's four 'Scenarios' is in effect for a particular SAP (see post #56). If enough users participate, we might be able to arrive at some real-world conclusions regarding the desirability of different colorimetry/header combinations.

But... is this type of blind study possible? Or rather, given a test DVD with a few sample clips: does there exist a series of simple-to-answer questions that will tell us which of Immersion's "Scenarios" a given SAP is using?

jdobbs
4th November 2007, 01:59
2. What conversion is DGDECODE doing when it frame serves it to HC or CCE?
it does nothing, the encoders do nothing. Uhh... it does something as it very obviously decodes it and presents it to the encoder as a picture.

fjhdavid
4th November 2007, 02:05
All the DVD players on the market are using a DVD decoder chip, and major chip manufacturer (MTK, cirruslogic, sigmadesign) are 601 compliant (see my previous posts).

then if 709 DVD was the norm, all this DVD player would play 709 DVD with a chromacity error (independantly from DVD-RB or HC/CCE)....do you think that all these engineers are wrong? I don't know but I doubt...

this is why Hawk and myself said that DVD must be 601 compliant as there is so much info on the net according to this fact.

kumi
4th November 2007, 02:21
All the DVD players on the market are using a DVD decoder chip, and major chip manufacturer (MTK, cirruslogic, sigmadesign) are 601 compliant (see my previous posts).I just looked through your posts, and I only see a clear answer about the MTK chipset.


this is why Hawk and myself said that DVD must be 601 compliant as there is so much info on the net according to this fact.Yes, I agree that Hank's word is valuable, but his tests were limited to PowerDVD. We still don't know the answer to what SAPs do, IMHO.

fjhdavid
4th November 2007, 10:54
No Kumi, look at my post 52 for sigmadesign...

and earlier post for cirruslogic (I don't remember where)
Remember in Post 37 I told you about PowerDVD (which is nr 1 for PC)

but we have to be pragmatic

for 601 flagged DVD the problem is solved (that was my original question!) as I know that all my 601 are working without colormatrixfilter

for "709 Dgindex flagged DVD" if you are ok with your DVD and your DVD player, it is the more important (and it seems to because I think your "709 DVD" are in reality 601 DVD with no header extension....)
(everything was ok for "dgindex 709 flagged DVD" from the beginning...the real question was just for 601 flagged DVD)

but this thread is useful as we learn many things...

Sharc
4th November 2007, 13:02
Hi experts

I came across the following:

1) Original DVD, Sequence Display Extension:
color_primaries=5 (ITU-R recommendation 624-4 System B,G)
transfer_characteristics=5 (ITU-R recommendation 624-4 System B,G)
matrix_coefficients=5 (ITU-R recommendation 624-4 System B,G)

2) DGindex info shows this as:
BT 470-2 B,G

3) My question:
What conversion - if any - should I include in the DVD-RB avisynth script? (xxx, yyy parameters?).
c:i:ColorMatrix(mode="rec.xxx->rec.yyy",interlaced=true)
c:p:ColorMatrix(mode="rec.xxx->rec.yyy").
For CCE, for HCenc?

I don't know what my DVD player expects, or how to find out.

Sorry if my question should be out of the scope of this thread.

fjhdavid
4th November 2007, 19:02
It seems that you have "flagged 601 DVD" (recorded from a Satellite box or an adsl box I presume?), then you should include NO conversion filters (colormatrix or others conversion filters) in the DVD-RB avisynth script

It is true for CCE and HCenc (maybe for others encoder, but I did tests only for these two decoders)

your standalone DVD player expect bt.601 and will output 601 in SD resolution (576i, 576p, 480i,480p)
your DVD software player for PC expect 601 and in your case (flagged 601 DVD), even dgindex expect 601


if your DVD is an upscaler player, then it will do, itself, the proper conversion from 601 to 709 to deliver HD resolution (720p, 1080i and 1080p)

you have to check also what your display is expecting, as sometimes, even if they are native HD, they expect 601 (but it was true for old plasma or videoprojector)

45tripp
4th November 2007, 19:17
it does nothing, the encoders do nothing.

Uhh... it does something as it very obviously decodes it and presents it to the encoder as a picture.
Then quite obviously the encoder takes the pictures and compresses them to a new set?
Am I on the right track?


2. What conversion is DGDECODE doing when it frame serves it to HC or CCE?

Nothing with regard to the color considerations being discussed.
At least not in it's common use.

it very obviously decodes it and presents it to the encoder as a picture.
not to rgb,
at least not in it's common use.


1.Take the following:
colorbars(720,480)
killaudio()
converttoyv12(matrix="rec709")
trim(1,60)

2.feed to cce, encode.

3.take output and index with dgindex

4.Add some conversion in decode, for fun
LoadPlugin("C:\Program Files\AviSynth 2.5\dgdecode.dll")
mpeg2Source("colorbar709.d2v", upconv=1)

5.encode with cce

709 down the line.
3 and 5 are the same
(apart from worsening of the vertical chroma shift that is)


btw,
as far as I can see,
DGindex display is scenario3: respects headers and uses 601 in header absence (!)
and decode with upconv=2 is scenario2: respects headers and uses 709 in header absence.

gl

kumi
4th November 2007, 23:06
I don't know what my DVD player expects, or how to find out.

Burn a DVD ("Disc1") with three clips on it:
Clip "A" = Hank315's in601out601.m2v
Clip "B" = Hank315's in601out709.m2v
Clip "C" = colorbars(720,480,"YV12").trim(0,25) (Encoded with CCE)

Burn another DVD ("Disc2") with three clips on it:
Clip "A" = Hank315's in709out601.m2v
Clip "B" = Hank315's in709out709.m2v
Clip "C" = colorbars(720,480,"YV12").ColorMatrix(mode="Rec.601->Rec.709", clamp=false).trim(0,25) (encoded with CCE)


Now check for the following conditions on both DVDs. Both discs should match:

If "B" and "C" do not look the same:
-> Your player respects colorimetry header info, and assumes Rec.601 when it is not present.

If "B" and "C" look the same and "A" and "B" do not look the same:
-> Your player respects colorimetry header info, and assumes Rec.709 when it is not present.

If "B" and "C" look the same and "A" and "B" look the same:
-> Your player does NOT respect colorimetry header info, and uses arbitrary coefficients to convert colorspace. In this case, I don't think it's possible to know for certain which coefficients it uses unless you have a calibrated test pattern for comparison.

Although it is possible to guess! Compare any of the clips on Disc1 and any of the clips on Disc2 with the reference SMPTE colorbars:
http://img523.imageshack.us/img523/2532/smptecolorbarsuo4.th.png (http://img523.imageshack.us/img523/2532/smptecolorbarsuo4.png)

If the clips on Disc1 (they should all look identical) are closer to the reference pattern than Disc2, your player uses Rec.601 coefficients, all the time.

If the clips on Disc2 (they should all look identical) are closer to the reference pattern than Disc1, your player uses Rec.709 coefficients, all the time.

Sharc
5th November 2007, 01:23
Thanks kumi.
Where do I get clips A and B from?

kumi
5th November 2007, 01:27
Link to the .zip is at the bottom of this post: http://forum.doom9.org/showpost.php?p=1061520&postcount=53

If you do try that out on your SAP, it'd be great to hear what your results are ;)

fjhdavid
5th November 2007, 02:18
may I know Sharc what is your DVD player brand and model and display?

if the decoding chip inside is coming from cirrus logic, MTK or sigmadesign, your DVD player is 601 (you can know the decoder chip by reading review on the net) and as you can read on the net almost (if not all) DVD players are 601 compliant...

BUT if you want to play and find the DVD player compliancy, you must know also what is your display compliancy (709 or 601 and regarding to which resolution SD or HD)...

secondly, are you always using SD or HD output as results should be completly different...

thirdly, if you are not watching the two prictures side by side, or if you have to swap your DVD in the player, or wait 2 or 3 seconds between each pictures, you won't be able to see anything, as the difference are sometimes invisible (in the blue) or hard to see (a colorimeter like a "spyder" for example is a must have for this kind of exercise...)


I think you will loose your time except if you watch always your DVD with a DVD player software on PC (as you can take picture you can check with photoshop)...

for info, differences are going from 0 to 15% (max!) in RGB level and eyes is not sensitive the same way to all wavelength and is in NO way an absolute detector but a relative one...

do a favor for me: take your halogen in your living room and look at the luminosity (medium level), then close your eyes 5 seconds, and in the same time ask a friends to change the intensity in a very small way, then open your eyes and say if the luminosity as decreased or increased....I did it and I am wrong 2 times out of 5....end of story

kumi
5th November 2007, 03:02
you must know also what is your display compliancy (709 or 601 and regarding to which resolution SD or HD) if you want to test only the DVD player
That's not entirely correct. Yes, players that do not respect the sequence display extension field are difficult to test. But if your player DOES respect this field, you can easily determine what default coefficients it uses to decode streams missing the sequence display extension! You do not need to know about your display, possess a colorimeter, calibrate any equipment, or compare to reference test patterns.

Just answer a few "does this look the same" questions, as in my last post.

fjhdavid
5th November 2007, 03:15
Kumi, did you see my post on the halogen luminosity? do it yourself and tell me if you are right all the time.

the problem is that except for DGindex, players DON'T seem to respect the sequence display extension field (and the norm itself is a mess)...

Sharc, I don't want to start the thread from the beginning, I think we have now the answers (or at least a very very good statistical guess) to our questions and my post 64 is just a summary for your case and question

one more time we have to be pragmatic...maybe we never know for sure....but according to our knowledge...the post 64 is highly likely

kumi
5th November 2007, 04:47
Yes, I read your post, but you didn't read mine ;) I'm only talking about players that respect the sequence display extension. Halogen luminosity is not important for these types. Let's break it down so it's easy to see. Consider 6 sample clips:

Clip "A": Rec.601 input, Rec.601 coefficients
Clip "B": Rec.601 input, Rec.709 coefficients
Clip "C": Rec.601 input, missing coefficients
Clip "D": Rec.709 input, Rec.601 coefficients
Clip "E": Rec.709 input, Rec.709 coefficients
Clip "F": Rec.709 input, missing coefficients



And four possible player behaviors:

Behavior 1: Sequence display extension not respected, Rec.601 conversion always
Behavior 2: Sequence display extension respected, Rec.601 coefficients assumed if extension missing
Behavior 3: Sequence display extension not respected, Rec.709 conversion always
Behavior 4: Sequence display extension respected, Rec.709 coefficients assumed if extension missing



Each Behavior will have a distinct fingerprint, in the form of how different clips are displayed with respect to each other:

"A" "B" "C" "D" "E" "F"
+----------------------------------------------------------------------
Behavior 1 | Normal Normal Normal Green-push Green-push Green-push
Behavior 2 | Normal Red-push Normal Green-push Normal Green-push
Behavior 3 | Red-push Red-push Red-push Normal Normal Normal
Behavior 4 | Normal Red-push Red-push Green-push Normal Normal



IF
"B" and "C" (or "E" and "F") look different
...we know our player MUST HAVE Behavior 2.


IF
"B" and "C" (or "E" and "F") look the same
AND
"A" and "B" (or "D" and "E") look different
...we know our player MUST HAVE Behavior 4.



P.S.: I'm NOT talking about Behavior 1 or 3. Knowing which of those a player is operating under involves real work! Determining the player's default coefficient in these two cases will require calibration and actual color measurement. Perhaps "halogen luminosity" is a factor here as well, I don't know.

But Behavior 2 and Behavior 4 do not require fancy steps.

Sharc
5th November 2007, 07:19
fjhdavid, kumi:

Thanks so much for your comments. I didn't want to start a new debate, and I am now more than happy to learn that the differences are minor, so there is little risk for my backups to be "noticeably wrong" because a colorimetry conversion is missing or superfluous.

Anyway, I may try kumi's test some time later this week to satisfy my curiousity, and report the results when available.

Added:
..and fjhdavid:
May DVD player is "no name / low cost" buy from a special offer .....

fjhdavid
5th November 2007, 10:26
Kumi,

I will try to do it too, but I have two questions:

In all the behaviour you talked about, will I have to compare different pictures that are not displayed in the same time or am I wrong?

secondly, my display is a sanyo Z3 projector which have a particularity (reported my many display calibrators): it is a 720P panel that expects 709 HD signal, but when you feed it with 601 SD, it also expect 709 even if it scaled the picture from SD to HD...so will all your GP or RP combinaison change or not?

thanks

kumi
5th November 2007, 19:38
will I have to compare different pictures that are not displayed in the same time or am I wrong?
That's right. "Is 'A' the same as 'B'" means you have to cycle between "A" and "B" with your remote. Author a DVD-Video with some simple navigation to cycle through the 6 different clips.


when you feed it with 601 SD, it also expect 709 even if it scaled the picture from SD to HD...
Please clarify: your projector will apply a conversion using Rec.709 coefficients on all types of SD input? Are there any input jacks or display modes that don't have this problem? If not, maybe you need to find a different TV to test your DVD player equipment...

Sharc
5th November 2007, 23:38
Here my results:
Disc 1:
A1 = B1, C1 slightly different (blue colors at the bottom of the picture

Disc 2:
A2=B2, C2 slightly different (blue colors at the bottom of the picture).

There seem to be very subtle differences between Disc1 and Disc2, ie between A1/A2 and B1/B2.

Added:
For the C clips produced with CCE I had to convert to YUY2() because CCE does not accept YV12.

kumi
5th November 2007, 23:49
A1=B1 and A2=B2?

Then it seems your player does not respect colorimetry stream parameters. Although I'm not sure what to infer from that slight difference in C1/C2.

Sharc
6th November 2007, 00:09
For clarification:
A1: Clip A of Disc 1
B1: Clip B of Disc 1
C2: Clip C of Disc 2
etc.

Yes. A1=B1, A2=B2
C1 is different from (A1,B1).

Same for Disc 2.
Disc 2 appears to be very slightly different from Disc 1 (?)

Here my test DVD for download:
http://rapidshare.com/files/67713605/VIDEO_TS.ZIP.html

45tripp
6th November 2007, 03:07
There seem to be very subtle differences between Disc1 and Disc2, ie between A1/A2 and B1/B2.


Of course.
Is the green of disk 1 too dark?
or is the green of disk 2 too light?

I say two too light,
and have money firmly on 601.

Although I'm not sure what to infer from that slight difference in C1/C2.

luma range.



I edited a correction in my last post,
dgindex display.... peculiar.

gl

Sharc
6th November 2007, 05:15
Is the green of disk 1 too dark?
or is the green of disk 2 too light?

I say two too light,
and have money firmly on 601.


Yes, exactly.
Disk1: green is darker than on Disk2
Disk2: Green appears too light.

Btw: For the C clips avisnyth didn't accept the clamp=false.
Clamp is unknown. Are there different versions of the colormatrix plug-in?
Edit: Solved with version 2.2 (I had to update from 2.0)

=> New test DVD here:
http://rapidshare.com/files/67775503/VIDEO_TS.ZIP.html

ToS_Maverick
12th November 2007, 14:06
thank you all for the whole lot of information in this thread! i think you got almost all information together ;)

now what i'm wondering is, why dosesnt ffdshow respect the colorimetry flags? even the very robust MPV decoder filter doesn't?!

Insomniak4700
14th November 2007, 00:44
Now this thread is interesting, but the more I read about colormatrix and bt709 vs 601 for dvd players, the more I get confused.... If I try to resume all this, Am i correct in assuming that there is no real standard, but that usualy all SD programs are 601?

A lot of people here have recommended the colormatrix filter to go from 601 to bt 709 for CCE and other encoders. Is this still considered true?

Or should I just remove this from my filter chain and let DVD-RB and CCE do their stuff? (I believe CCE will output 601 for 601 input, and 709 for 709 input?)

Thanks everyone, I thought I had all this color matrix stuff sorted out, but now i'm confused as h*ll

kumi
14th November 2007, 01:25
A lot of people here have recommended the colormatrix filter to go from 601 to bt 709 for CCE and other encoders. Is this still considered true?
The standard for SD MPEG-2 may actually be Rec.601, according to Hank and others. If that's the case, then your Rec.601->Rec.709 conversion is incorrect.


Or should I just remove this from my filter chain and let DVD-RB and CCE do their stuff?
If you believe that Rec.601 is the standard for SD MPEG-2, you should make sure you always feed CCE with Rec.601, i.e.
ColorMatrix(dest=2, hints=true)

dragongodz
14th November 2007, 12:47
The standard for SD MPEG-2 may actually be Rec.601

i disagree. the only specs we have say you either have the information in the mpeg or if it is not there then assume 709. what the question here is about is dvd playback which really hasnt been helped by all these posts about things like sd transmission etc which could just as easily have its own limitations etc. lets not try to confuse mpeg2 in general with other "standards".

Sharc, I don't want to start the thread from the beginning, I think we have now the answers (or at least a very very good statistical guess) to our questions and my post 64 is just a summary for your case and question

actually you came here with a pre-conceived idea in your head and have pushed that non stop. not wanting to start this thread ? well you started first in HC's thread, then this one and then another in the "mpeg2 encoding" section. cross post city.
seems you think you have proved your point so you are happy.

fjhdavid
14th November 2007, 16:40
insomniak,

if you are not sure about your source, Kumi and others gave some tests to guess.

What is sure is that PowerDVD is 601 (it doesn't care about the header extension)
a lot of DVD player (like Oppo, or players using MTK, cirruslogic or sigmadesign chip) seems also to be 601

most of the time DVD doesn't have info in their header extension and were supposed to be 709 (this is why many talked about (and used) the colormatrix (601 ->709)).

but it seems now that the norm is not so clear and that we must consider DVD to be 601 by default (then you must NOT use the colormatrix anymore for this purpose).

another info, is that my DVD are 601 (because they are recorded with a DVD recorder which writes 601 in the header extension).
In this case, the use of colormatrix (bt 601->bt 709) give me wrong results. I tested it with DVD calibration tools so I don't use colormatrix anymore in my case.

Boulder
14th November 2007, 17:29
I'm not sure what to think. I just did a small test once again, and the screenshots are here to see:

I used HC022 to encode, setting the flag appropriately. The screenshots are from VDubMod. DGIndex v1.4.9 used.
Original, not flagged (marked as unknown in DGIndex).
http://img131.imageshack.us/img131/486/orgcj4.th.png (http://img131.imageshack.us/my.php?image=orgcj4.png)
No ColorMatrix, no flag set in HC
http://img111.imageshack.us/img111/5707/nocmhb7.th.png (http://img111.imageshack.us/my.php?image=nocmhb7.png)
Rec.709->Rec.601, flagged as BT.470-2M
http://img136.imageshack.us/img136/4712/rec601uq7.th.png (http://img136.imageshack.us/my.php?image=rec601uq7.png)
Rec.601->Rec.709, flagged as BT.709
http://img136.imageshack.us/img136/7584/rec709nf0.th.png (http://img136.imageshack.us/my.php?image=rec709nf0.png)

In my DVD player (an old Pioneer DV-343), all of them look different. The one that is converted from Rec.601->Rec.709 does look a lot closer to the original though, but it is still not the same (except for the one that has no CM nor the flag set).

EDIT: I have never used ColorMatrix in the case where I have an unknown colorimetry shown. I'll test videos that have a flagged stream as soon as I've got the time.

kumi
14th November 2007, 21:35
i disagree. the only specs we have say you either have the information in the mpeg or if it is not there then assume 709. what the question here is about is dvd playback which really hasnt been helped by all these posts about things like sd transmission etc which could just as easily have its own limitations etc.
Fair enough. Do you agree with Hank that DVD has it's own rules, and that Rec.601 is more appropriate? http://forum.doom9.org/showthread.php?p=1061520#post1061520

45tripp
17th November 2007, 00:22
i disagree. the only specs we have say you either have the

information in the mpeg or if it is not there then assume 709.

And what good is that info?
If you know your app/player doesn't comply to this rule when converting to rgb?
If your source carries 601 coefficients but isn't flagged?


@Boulder
Vdubmod has known behaviour,
it complies to the spec drogongodz quotes,
respects flags, assumes 709 in absence.
You can easily predict the result without seeing actual output.

You might expect they look different.
You're forcing a push with colormatrix.

But,
Actually they shouldn't be that different.
You must have done something wrong.

image1 will always equal image2.
In vdub with what you did you should get:
image1=image2=image3,
image4 to have lighter greens/darker reds than the others.

your image3 is wrong,
I assume you didn't flag it correctly, either not setting a flag or setting
a 709 equivalent.

Deciding which set is 'correct',
can stem from assumption, comparison to external imagery, or just plain taste.

I don't like the quality of the image nor the selected frame enough to venture a guess.

You only need one of image1 and image2,
image3 is not required,
the correct way to produce image4 is to not apply colormatrix and encode applying 601 flags.

I think colormatrix should be limited in use.
A good example of use would be if you assumed/thought/liked your source as 709,
and knew your player was to ignore flags and use 601 coeffs,
then you could use mode="rec.709->rec.601"

gl

dragongodz
17th November 2007, 05:55
Do you agree with Hank that DVD has it's own rules

if you reread the statement you quoted that is EXACTLY what it says. it infact goes even further to say that you can not say specs for any other "standard" such as transmissions etc can be used as any sort of conclusive proof of what the dvd specs are as they may have their own set of limits.
you however said the standard for SD mpeg2 and NOT dvd. so i disagreed since plain mpeg2 specs we do actually have some documentation for.

and that Rec.601 is more appropriate?

that i am holding my judgement on for now. lets just say there are reasons i have doubts thats totally correct and when i have more information either way then i will respond.

And what good is that info?

please read the above response and take it in the actual context. i can easily ask what a lot of posts in this thread have to do with actual dvds aswell.
too much guessing and assuming based on other sources.

dragongodz
21st January 2008, 04:05
ok i have got some more information back about this. please find my latest post in this thread

http://forum.doom9.org/showthread.php?p=1089979

hkazemi
21st January 2008, 10:19
I've compiled a summary to hopefully consolidate the threads and address the confusion over colorspace and the usage of Colormatrix. It is available at http://forum.doom9.org/showthread.php?t=133982#post1090068

jdobbs
21st January 2008, 16:11
Just as a short add-on to this discussion -- I've been doing a lot of analysis on this lately as I'm backing up DVDs. It is not wise to make any assumptions on colorimetry based upon resolution (SD vs. HD). For example, while it is apparent that the default for DVD is BT.601 based upon the most current ITU docs and general consensus -- there are a lot of DVDs where the colorimetry is explicitly called out to be BT.709 in the SEQUENCE_DISPLAY_EXTENSION even though the source is SD. Whether that flag is honored by players (according to dragongodz link) isn't clear (at least to me).

hkazemi
21st January 2008, 18:17
Just as a short add-on to this discussion -- I've been doing a lot of analysis on this lately as I'm backing up DVDs. It is not wise to make any assumptions on colorimetry based upon resolution (SD vs. HD). For example, while it is apparent that the default for DVD is BT.601 based upon the most current ITU docs and general consensus -- there are a lot of DVDs where the colorimetry is explicitly called out to be BT.709 in the SEQUENCE_DISPLAY_EXTENSION even though the source is SD. Whether that flag is honored by players (according to dragongodz link) isn't clear (at least to me).

Do you have some examples of these DVDs that apparently are flagged BT.709? (Examples were requested in one of the threads.)

Note: There was an assumption in DGDECODE/DGINDEX versions before 1.5.0 beta 12 defaulted to reporting BT.709 when colorimetry information was not specified by 'sequence_display_extension'. If you were identifying DVDs as BT.709 based on output of DGDECODE/DGINDEX, you very well could have been seeing BT.709.

DGMPGDec/DGINDEX versions starting with 1.5.0 beta 12 (released Nov 9, 2007)(including the current 1.5.0 RC2), report BT.709* for HD video and BT.470-2* [aka BT.601] for SD video when colorimetry information is not specified by 'sequence_display_extension'. The asterisk (*) means the stream did not declare the colorimetry.

Boulder
21st January 2008, 20:26
Many PAL DVDs are flagged as BT.709.

jdobbs
21st January 2008, 23:02
Do you have some examples of these DVDs that apparently are flagged BT.709? (Examples were requested in one of the threads.)

Note: There was an assumption in DGDECODE/DGINDEX versions before 1.5.0 beta 12 defaulted to reporting BT.709 when colorimetry information was not specified by 'sequence_display_extension'. If you were identifying DVDs as BT.709 based on output of DGDECODE/DGINDEX, you very well could have been seeing BT.709.

DGMPGDec/DGINDEX versions starting with 1.5.0 beta 12 (released Nov 9, 2007)(including the current 1.5.0 RC2), report BT.709* for HD video and BT.470-2* [aka BT.601] for SD video when colorimetry information is not specified by 'sequence_display_extension'. The asterisk (*) means the stream did not declare the colorimetry.I'm not relying on DGDECODE/DGINDEX. I've written software that actually scans for the header and tells me the settings (so its more than apparent -- it's fact). You can easily open them up in VOBEDIT and see the same thing. There are lots of examples -- but here's one from a backup I did today: "The Wire, Season 4", Region 1, Discs 3 & 4 (but probably all). Even the menus are flagged as Rec.709 on those.