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.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 21st January 2008, 08:59   #1  |  Link
hkazemi
Registered User
 
Join Date: Jan 2008
Posts: 63
Color coefficients and Colormatrix usage summary

Scroll to the end for the summary of this post.

People are talking about several, potentially different, types of MPEG-2 files:
1.) DVD MPEG-2 content (720x480) (often called 480p) (this is the content type most discussions in this forum focus on)
2.) ATSC SDTV MPEG-2 content (720x480) (480i, 480p) (probably recorded in .ts or .ps files)
3.) ATSC HDTV MPEG-2 content (1920x1080 or 1280x720) (1080i, 720p) (probably recorded in .ts or .ps files)

Notes:
ATSC = the US digital TV standard.
.ts = transport stream
.ps = program stream

Discussions at the doom9 forums about this topic:

A little confused on Colormatrix usage
http://forum.doom9.org/showthread.php?t=131571

bt.709 and CCE
http://forum.doom9.org/showthread.php?t=131169

Colorimetry Info in H.264 Streams
http://forum.doom9.org/showthread.php?t=131717

ColorMatrix v2.3
http://forum.doom9.org/showthread.php?t=82217

Default colorimetry for MPEG1 always BT.470-2 correct?
http://forum.doom9.org/showthread.php?t=101482

HCenc 22 and Colorimetry
http://forum.doom9.org/showthread.php?t=132295


Findings:

Color Coefficients and equivalencies:
http://avisynth.org.ru/docs/english/...olormatrix.htm (Colormatrix 1.9 manual) says:
BT.601 = BT.470-2 = SMPTE 170M (BT.601 is an update of BT.470-2)
BT.709
FCC (similar to BT.601, can be handled on its own by Colormatrix v2.3)
SMPTE 240M (similar to BT.709, can be handled on its own by Colormatrix v2.3)

http://bengal.missouri.edu/~kes25c/ColorMatrixv23.zip (see colormatrix.htm):
-has a list of all color coefficient possibilities according to the MPEG-2 specs and DGDecode
-says: "How do you know which set of coefficients were used when encoding a MPEG-2 stream? Usually, the coefficient information is stored in the header of the MPEG-2 file (the "matrix_coefficients" field in the "sequence display extension"). Newer versions of GSpot will be able to read and display this information. Also, DGDecode v1.20+ (with Mpeg2source(info=1)) can be used to view it. If this extension field is not present in the header of the MPEG-2 file, the [MPEG-2] specs say we are supposed to assume the default of Rec.709"

http://broadcastengineering.com/infr...g_hdtv_format/ says for the 1280×720/60 HDTV format:
"There is no corresponding ITU standard, but certain signal characteristics, such as the colorimetry and coded signal's matrix coefficients, conform to the ITU 709."
"The coded signals matrix coefficients are defined in ITU-R BT.709 and are significantly different from those specified by ITU-R BT.601. The implication here is that format conversion applications require matrixing recalculation."

http://broadcastengineering.com/infr...g_sdtv_format/ says for the 720x483p SDTV format
"The specified coded signal matrix coefficients are as in ITU-R BT.601. The specified color primaries and transfer characteristics are as per SMPTE 170M. The implication here is that format conversion applications into and from ITU-R BT.709 (HDTV formats) require matrixing as well as colorimetry parameters recalculation."

http://broadcastengineering.com/infr...ntsc-20060305/
"Standards for color space are abound. For ATSC HD, SMPTE 274/ITU 709 while ITU 601 /SMPTE 259 is used for SD. NTSC color space should adhere to SMPTE 170 and SMPTE 240."

http://broadcastengineering.com/hdtv...sd_conversion/
Figure 4 says use BT.601 for:
SMPTE 170M NTSC
EBU 625 PAL SECAM
ANSI/SMPTE 293M 525/720x483/59.94/1:1
Figure 4 says use BT.709 for:
SMPTE 274M 1250/1920x1080/multiple rates/1:1,2:1
SMPTE 295M 1250/1920x1080/50/1:1,2:1
SMPTE 296M 705/1280x720/multiple rates/1:1

In regard to SMPTE 240M 1125/1920x1035/60, 59.94/2:1, Figure 4 says "ANSI/SMPTE 240M uses a luma equation that is similar to ITU-R BT.709, but is not exactly the same. In many applications the difference may be small enough to ignore, but these differences could become significant in critical applications."
i.e. BT.601 for SD formats, BT.709 for HD formats

http://www.vbshop.nl/products/INFOCUS/SP-M1-10M.pdf has a table on page 1 showing "DVD ITU-R-601"

http://www.avsforum.com/avs-vb/showt...pp=30&page=144
"The Oppos [Oppo Digital DV-981HD] use 601 for 480 and 709 for 720 and 1080, when set to YCbCr."
"Upconverted SD DVDs should be output with 709 because when a TV sees a 720p, 1080i or 1080p signal it assumes its HDTV standard which uses REC 709."

http://www.avsforum.com/avs-vb/showt...pp=30&page=145
"The MTK solution decodes at BT.601. Once this signal is sent to the Faroudja chipset, the Faroudja chipset will then sample it at the native BT.601 (480p) or convert it to
BT.709 (720p, 1080i, 1080p)."
"SD DVD is recorded using the YCbCr ITU-R BT.601 colorspace. An HDMI DVD player does not change this for SD output resolutions (480i/480p). But when upconverting to HD resolutions (720p/1080i/1080p), the player has to convert the colorspace to YCbCr ITU-R BT.709, otherwise a color mismatch exists."

http://www.dvddemystified.com/dvdfaq.html#3.4
"Picture dimensions are at maximum 720x480 (for 525/60 NTSC display) or 720x576 (for 625/50 PAL/SECAM display). Pictures are subsampled from 4:2:2 ITU-R BT.601 down to 4:2:0 before encoding, allocating an average of 12 bits/pixel in YCbCr format."

http://forum.doom9.org/showthread.php?t=131169&page=2
jdobbs: "DGIndex won't show Rec.601 unless there is a sequence_display_extension() calling it out. If it is missing, DGIndex assumes Rec.709 (as it should)."

http://forum.doom9.org/showthread.ph...=3#post1061279
"The DVD-specs are supposed to be a subset of the MPEG-2 specs, but it wouldn't be the first time if two specs would contradict each other, when they should not."

http://forum.doom9.org/showthread.ph...=3#post1061520
"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."

http://forum.doom9.org/showthread.ph...=3#post1061672
"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."

From http://forum.doom9.org/showthread.php?t=131169&page=5, it appears that DVDs are usually BT.601, while other MPEG-2 content apparently defaults to BT.709.

http://forum.doom9.org/showthread.ph...71#post1063256
foxyshadis: "MPEG2 default is BT.709, MPEG4 default is BT.601 in SD, MPEG4 default in HD is BT.709. All of this can be overriden or ignored and often is. MPEG1 is always
BT.601, that can't be overriden (but can be ignored, of course)."

http://forum.doom9.org/showthread.php?t=131717
"many of devices intepret SD as 601, HD as 709"

http://forum.doom9.org/showthread.ph...95#post1071619
hwjohn: "The option sets a flag in the bitstream that indicates which standard (BT. 601 or BT. 709) that the playback device should use to decode colors. A lot of playback
devices just ignore the flag because, like lots of other flags, it is not required and is usually unreliable at best (people doing the encoding don't set it correctly).
Most playback devices will use the resolution as a clue to what standard to use, with SD resolutions normally using 601 and HD resolutions normally using 709.
If you want to set the flag for SD content, use 601. For HD content (720p, 1080i), use 709.
What happens if the player gets it wrong? Most players will simply use the wrong matrix to decode the colors and, in simple terms, the color will be incorrect."

http://forum.doom9.org/showthread.ph...95#post1072444
hwjohn: "You have already given some proof to my statement; most (if not all) display devices "guess" 601 for SD, and 709 for HD. I doubt that this was done on a whim. Here
is also a link about YCbCr from wikipedia: http://en.wikipedia.org/wiki/YCbCr
You will notice that they reference 601 as SD and 709 as HD. You can find this type of "assumption" all over the place, just do a Google search. Also, the three primary colors defined by Rec 601 are within the gamut defined by the primary colors in Rec 709 (in other words, the entire 601 gamut is contained within the 709 gamut). Every SDTV I have ever heard of targets the primaries as defined in Rec 601 (notice I say targets, many of them are off because of poor design). Likewise,
every HDTV I have ever heard of uses Rec 709 primaries. It wouldn't make sense for SD DVD to use Rec 601 primaries and a Rec 709 color decoding matrix."

http://forum.doom9.org/showthread.ph...95#post1074680
hwjohn: "Well, I asked a guy who is the most knowledgeable person about compression I know (he currently engineers hardware for Motorola cable boxes I think). He basically said that he didn't know why the 1995 spec said what is says.
He did say that when a DVD does signal the decoding matrix, that he has never seen one signal 709. He said that everyone he has every seen (which is likely a bunch) has signaled 601. Two examples he gave were I Robot and Borat.
I know that this isn't exactly conclusive evidence, but when the flag isn't signaled then there really isn't any way to know. Based on all the evidence I (and others) have found, one should assume that DVD is Rec 601 when the flag is not set. You are basically taking a very good, educated guess. Chances are if you flag it as 709 and the player actually reads and uses the flag, then you will be using the wrong decoding matrix and thus the wrong colors.
If the original 1995 spec was correct, then I don't suppose they would have changed it. I have a feeling it was changed because they realized that playback devices would be decoding the vast majority of DVDs incorrectly by following the spec."

http://forum.doom9.org/showthread.ph...95#post1075105
ariga: Here is some information I found in "Video Demystified". Seems to suggest BT.709 is not the default for DVDs.
Quote:
Sequence Display Extension:

Color_primaries
This optional 8-bit codeword describes the chromaticity coordinates of the source primaries, as shown in table. If sequence_display_extension is not present, or color_description = 0, the indicated default value must be used. This information may be used to adjust the color processing after MPEG-2 decoding to compensate for the color primaries of the display.

Code:
-----------------------------------------------------------------------------------
|    Color Primaries     |    Code     |          Application Default               |
|------------------------|-------------|--------------------------------------------|
| forbidden              |  0000 0000  |                                            |
| BT.709, SMPTE 274M     |  0000 0001  | MPEG-2, ATSC, DVB 25Hz HDTV, DVB 30Hz HDTV |
| unspecified            |  0000 0010  |                                            |
| reserved               |  0000 0011  |                                            |
| BT.470 system M        |  0000 0100  | DVD-Video 30 Hz                            |
| BT.470 system B, G, I  |  0000 0101  | DVD-Video 25 Hz, DVB 25Hz SDTV             |
| SMPTE 170M             |  0000 0110  | DVD-Video 30 Hz, DVB 30Hz SDTV             |
| SMPTE 240M             |  0000 0111  |                                            |
| reserved               |  0000 1000  |                                            |
| :                      |      :      |                                            |
| reserved               |  1111 1111  |                                            |
 -----------------------------------------------------------------------------------
ATSC Standards
A/53, Part 4:2007, “MPEG-2 Video System Characteristics”
http://www.atsc.org/standards/a_53-Part-4-2007.pdf Page 10-11 Section 6.1.4 Sequence Display Extension Constraints
and
A/81: Direct-to-Home Satellite Broadcast Standard
http://www.atsc.org/standards/a_81.pdf Page 18 Section 7.3.4 Sequence Display Extension Constraints say:
Table 7.5 identifies parameters in the sequence display extension part of a bit stream that shall be constrained by the video subsystem and lists the allowed values for each.

Table 7.5 Sequence Display Extension Constraints
Sequence Display Extension Syntactic Element Allowed Values
video_format ‘000’

The values for color_primaries, transfer_characteristics, and matrix_coefficients shall be explicitly indicated in the sequence_display_extension. While all values for color_primaries, transfer_characteristics, and matrix_coefficients defined in Tables 6-7, 6-8, and 6-9 of ISO/IEC 13818-2 [16, 18] are allowed in the transmitted bit stream, it is noted that ITU-R BT.709 [27] and SMPTE 170M are the most likely to be in common use.

Note: Some previously-encoded legacy material may not have the colorimetry (i.e., color_primaries, transfer_characteristics, and matrix_coefficients) explicitly indicated in the sequence_display_extension, in which case the colorimetry is most likely ITU-R BT.709 for all formats except those formats with vertical_size_value = 480, which are most likely to have colorimetry according to SMPTE 170M.
hkazemi is offline   Reply With Quote
Old 21st January 2008, 09:01   #2  |  Link
hkazemi
Registered User
 
Join Date: Jan 2008
Posts: 63
Color coefficients and Colormatrix usage summary (findings continued)

http://www.videoguys.com/procoder.html mentions these video filters for SD and HD
601 to 709 Color Correction (ITU-R BT 601 SD to ITU-R BT 709-5 HD)
709 to 601 Color Correction (ITU-R BT 709-5 HD to ITU-R BT 601 SD)

High-Definition H.264 Encoder & Decoder http://www.wwcoms.com/products/produ...w10k-pb-r2.pdf
"The 4 video input ports accept ITU-R BT 709-4, YUV 4:2:2 formatted digital video bit streams for HD resolution video and ITU-R BT 601, YUV 4:2:2 formatted digital video bit streams for SD or lower resolutions."

Colour difference coding in computing (unfinished) http://scanline.ca/ycbcr/ has a table 'Differences in RGB chromaticities' although it seems to group the equivalencies of the various standards different from other places I've seen.

http://forum.doom9.org/showthread.php?t=82217&page=23
"I've been putting up with it for two years, once I figured out what caused it, filing occasional support requests, and the flip-flopping in the drivers and the steady
stream of posts by other people with the same problem have just grated on me. So I'm a little more annoyed at them than I should be. That's the reason I suspect that
instead of honoring any colorometry flag, they will just use one and ignore the stream. As in your case, they pick one flag for SD and one flag for HD - that's simply
wrong, hardly any better than forcing one all the time."

http://msdn2.microsoft.com/en-us/library/ms796493.aspx
http://msdn2.microsoft.com/en-us/library/ms796568.aspx
DXVA_VideoTransferMatrix_Unknown
Specifies that the video transfer matrix is not specified. The default is BT601 for standard definition (SD) video and BT709 for high definition (HD) video.

http://forum.doom9.org/showthread.php?t=82217&page=24
Windows VMR7 and VMR9 use BT.601 for video < 720p (720 vertical lines)
Windows VMR7 and VMR9 use BT.709 for video >= 720p (720 vertical lines)
"All H.264/AVC and VC1 videos on HD-DVD's and Blu-Ray are BT.709 colorimetry."

http://forum.doom9.org/showthread.php?t=82217&page=26
foxyshadis: "Simple: If it's anything but 601 for SD or 709 for HD you should use it, make sure you always use it with source->dest arguments. The readme mentions BT.470
and 170M are the same as 601, so just refer back to it if you ever forget."
"Yes, but specify your destination if it's HD (where 709 is preferred). Colormatrix doesn't try to detect HD and will always use 601 by default."

http://www.afterdawn.com/guides/arch...tsc_page_5.cfm
"since all MPEG-4 ASP (DivX, XviD, etc,...) encoders use Rec.601 color, you can safely assume that any video in that format uses Rec.601."

LCoS Display Technology Shoot-Out, Part B http://www.extremetech.com/article2/...1923429,00.asp
"For HD content, the standard colors are specified in the ITU-R BT.709 standard (Rec.709)."

DGMPGDec 1.5.0 release candidate 2
http://forum.doom9.org/showthread.php?t=129510&page=7
new feature for Version 1.5.0 beta 12: "When a stream does not declare the colorimetry, matrix_coefficients=1 [ITU-R BT.709] is assumed for HD video and matrix_coefficients=5 [ITU-R BT.470-2 aka ITU-R BT.601] is assumed for SD video."

http://neuron2.net/dgmpgdec/dgmpgdec150rc2.zip (see DGIndexManual.html) says:
"Colorimetry - Displays the colorimetry scheme used by the stream. Note that if the stream does not declare the colorimetry, then ITU-R BT.709* is reported for HD video, and ITU-R BT.470-2* is reported for SD video. The * character indicates that the stream did not declare the colorimetry."

http://forum.doom9.org/showthread.ph...95#post1089979
dragongodz: Having finally heard back from a person who is in the professional encoder industry(no i will not say who) i have more reliable information.
The table is actually the limitation of what you can use. in other words if you set the sequence_display_extension to bt.709 for dvd it is illegal. that doesnt mean it will not play etc it just means that it is not supported and any player that strictly follows the specs is more likely just to ignore it as if no value was set at all.
As for what is used i was told he could not see any specific instructions of what must be used, so he assumed the manufacturer(for hardware) is able to choose from those which he uses for "to RGB" conversion.
Now for PAL there is only 1 option, BT.470 system B, G, I listed so i assume this is what should be used.
However for NTSC there is actually 2, BT.470 system M and SMPTE 170M, so either could be used.

Last edited by hkazemi; 21st January 2008 at 09:24. Reason: added dragongodz finding that BT.709 is not for DVD use.
hkazemi is offline   Reply With Quote
Old 21st January 2008, 09:06   #3  |  Link
hkazemi
Registered User
 
Join Date: Jan 2008
Posts: 63
Color coefficients and Colormatrix usage summary (Q and A)

Summary:
-using the wrong colorspace will have the effect of making some colors brighter or darker than they should be. It is usually most noticeable on reds and greens. There are examples for both normal and improperly handled SD and HD on these links:
http://www.gadgetbench.com/colormatrixerrors/, http://www.sigmadesigns.com/public/S...omaticity.html, http://www6.impacthosting.com/trbarr...9ToBT601.2.jpg

-DVD specifications have contradicted the MPEG-2 specs in the past
-there may be a conflict between the DVD specs and MPEG-2 specs in regards to colorimetry
-Windows display drivers and video renderers (VMR7, VMR9, ATI and nVidia drivers) tend to follow the rule of BT.601 for < 720p content and BT.709 for >= 720p content
-DVD players and ATSC HDTVs tend to follow the rule of BT.601 for < 720p content and BT.709 for >= 720p content
-DGMPGDec/DGINDEX versions before 1.5.0 beta 12 defaulted to reporting BT.709 when colorimetry information was not specified by 'sequence_display_extension'
-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.


For VCD and MPEG-1 content, it appears that: BT.601 is always used

For DVD MPEG-2 content, it appears that: BT.601 is usually used (720x480) (often called 480p). If 'sequence_display_extension' is not specified, assume BT.601.

For ATSC MPEG-2 digital TV content, it appears that:
-BT.601 is used for SDTV (standard definition) (480i, 480p). For SD content, if 'sequence_display_extension' is not specified, assume BT.601 (this is per ATSC Standards
A/53, Part 4:2007)
-BT.709 is used for HDTV (high definition) (720p and 1080i). For non-SD (i.e. HD) content, if 'sequence_display_extension' is not specified, assume BT.709 (this is per ATSC Standards A/53, Part 4:2007)

For HD DVD and Blu-ray MPEG-2 content
-the specifications allow both SD and HD resolution MPEG-2 content
-I do not have any colorspace information specific to HD DVD or Blu-ray, but they probably use BT.709 for HD content and probably use BT.601 for SD
(verification would be appreciated)

What about CCE (Cinemacraft Encoder)?
CCE does not do anything with the colorimetry, whether BT.601 or BT.709 content is fed into it. CCE does not set the 'sequence_display_extension' flag as discussed on
http://forum.doom9.org/showthread.php?t=131169&page=2 and http://forum.doom9.org/showthread.php?t=131169&page=3 .

Why do some webpages say CCE expects BT.601?
(e.g. http://www.afterdawn.com/guides/arch...tsc_page_2.cfm which says "Cinemacraft Encoder Basic, one of the encoders that can be used for the next step, assumes Rec.601 for the input video")
Why do some webpages say CCE expects BT.709?
(e.g. http://bengal.missouri.edu/~kes25c/ColorMatrixv23.zip (see colormatrix.htm) says: "Rec.709 coefficients for CCE")
Why does http://avisynth.org/mediawiki/Convert say "Rec.709 should be used when your source is DVD" ?
These are probably due to confusion over how to properly handle DVD colorimetry (old MPEG-2 specs say BT.709 is the default while newer MPEG-2 specs are ambiguous), and because of an assumption made in DGMPGDec/DGINDEX versions before v1.5.0 beta 12 that showed all MPEG-2 streams as BT.709 if colorimetry information was not specified by the 'sequence_display_extension' field. DGMPGDec/DGINDEX versions starting with 1.5.0 beta 12 (since 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.

What did the older 1995 MPEG-2 spec (ISO/IEC 13818-2: 1995 (E)) say?
"In the case that sequence_display_extension() is not present in the bitstream or colour_description is zero the chromaticity is assumed to be that corresponding to
colour_primaries having the value 1."
and the value 1: "1 Recommendation ITU-R BT.709"
Note from fjhdavid: "if it is the 1995 version, DVD didn't exist at this time" (http://forum.doom9.org/showthread.ph...69#post1060180 )

What does the newer 2000 MPEG-2 spec (ITU-T Rec.H262 (2000 E)) say?
"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."
jdobbs interpreted it to mean "if the sequence_display_extension() isn't there -- your guess is as good as mine."
(http://forum.doom9.org/showthread.ph...=3#post1061338 )
ITU: http://www.itu.int/rec/T-REC-H.262/en
http://www.itu.int/rec/T-REC-H.262-2...F-E&type=items
http://www.itu.int/rec/T-REC-H.262-2...F-E&type=items

What encoders expect BT.709?
HCenc, any other encoder that by default flags the output stream as BT.709
(verification would be appreciated)

What encoders expect BT.601?
A. DivX, XviD, or other MPEG-4 ASP codecs
TMPGEnc/QuEnc (expects FCC, but BT.601 is similar)
(verification would be appreciated)

When should you use Colormatrix? (assuming HD >= 720 vertical lines i.e. 720p/1080i/1080p/etc.) :
-for downscaling HD to SD resolutions, you should use Colormatrix (from 709 to 601)
-i.e. to convert 720p HD DVD content to regular DVD content, use the 709 to 601 conversion and then a bilinear resize (preferable for downscaling)
-for upscaling SD to HD resolutions, you should use Colormatrix (from 601 to 709)
-i.e. to convert DVD content to 720p HD DVD content, use the 709 to 601 conversion and then the upscaling resizer of your choice
-for fixing a previously rescaled source (SD->HD or HD->SD) that didn't have it's colorimetry changed at the same time
-for fixing a source that appears to have the wrong colorimetry information (as determined by eye, by calibration tools, by comparison with another original source, by
personal preference)
-for changing a source that has an unusual colorimetry-resolution combination (e.g. BT.709 colorspace video rescaled to put on a DVD may not display the right colors on
devices that make decisions about colorimetry based on resolution. Colormatrix can be used to change the colorspace to better fit the expected norms.)
-for converting a BT.601 source into BT.709 before feeding it to an encoder expecting BT.709
-for converting a BT.709 source into BT.601 before feeding it to an encoder expecting BT.601

Where should you place Colormatrix in your script? (from http://www.afterdawn.com/guides/arch...tsc_page_5.cfm )
You can put the ColorMatrix line either directly after the line that loads your source or right after IVTC. In some cases you may have film based material with pulldown flags mixed with either pure interlaced video or hard pulldown. Since it's neither pure interlaced or pure progressive, you should generally try to figure out which one is prevalent (usually progressive). If it's mostly progressive (ie actual film frames) you should perform a progressive correction after IVTC. If it's primarily true
interlaced you should put it immediately after the source and before IVTC. Depending on what parts of your source are film and which are video (interlaced) you might even want to treat them differently. You can apply AviSynth filters to only part of a file by using an aligned splice, but we won't cover that here as all our files don't change
in the middle.

What about interlacing?
Look at the Colormatrix manual for information about using interlaced=true. There isn't any automatic way to set the interlacing paramenter yet, although you could make assumptions for most broadcast ATSC HDTV like 480i, 720p, and 1080i simply based on the vertical resolution (see Avisynth Height in
http://avisynth.org/mediawiki/Clip_properties )

What is the default Colormatrix conversion mode?
BT.709->BT.601. The other direction possible via manual settings.

What does hints=true do?
It tells Colormatrix to read the colorimetry hints output by DGDecode v1.20 and newer.

Are there any other Avisynth filters for color matrix conversions?
Yes, trbarry has written BT709ToBT601() which you can read about here: http://forum.doom9.org/showthread.php?s=&threadid=50588 and http://www6.impacthosting.com/trbarry/downloads.htm

In short I have these recommendations:
For DVD and ATSC 480p sources, do not use Colormatrix unless upscaling to HD resolutions, unless your encoder requires a colorspace conversion, or unless you know the colors are wrong.
For HD DVD/Bluray and ATSC 720p/1080i sources, do not use Colormatrix unless downscaling to SD resolutions, unless your encoder requires a colorspace conversion, or unless you know the colors are wrong.

Last edited by hkazemi; 7th February 2008 at 06:57. Reason: added links to examples of colormatrix errors
hkazemi is offline   Reply With Quote
Old 21st January 2008, 09:07   #4  |  Link
hkazemi
Registered User
 
Join Date: Jan 2008
Posts: 63
-reserved by hkazemi-
hkazemi is offline   Reply With Quote
Old 21st January 2008, 09:08   #5  |  Link
hkazemi
Registered User
 
Join Date: Jan 2008
Posts: 63
-also reserved-
hkazemi is offline   Reply With Quote
Old 18th September 2008, 01:43   #6  |  Link
bizz & buzz
Registered User
 
Join Date: Jun 2008
Posts: 95
wow, great work Hkazemi! it totally put some order into chaos... can't thank you enough for that.

this thread should be a sticky.
bizz & buzz is offline   Reply With Quote
Old 9th October 2008, 18:27   #7  |  Link
Lantis
Registered User
 
Join Date: Mar 2008
Posts: 8
Just dropping by to say thanks.
Lantis is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 21:45.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.