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. |
31st May 2006, 16:22 | #221 | Link | |
Registered User
Join Date: Mar 2004
Posts: 247
|
Quote:
js Last edited by jellysandwich; 31st May 2006 at 16:25. |
|
31st May 2006, 16:26 | #222 | Link | |
Moderator
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
|
Quote:
Does the change happen at the end or in the middle of the clip? |
|
8th August 2006, 22:16 | #223 | Link |
Registered User
Join Date: Aug 2005
Posts: 20
|
If an avisynth script outputs YV12 and I open it in VirtualDub, Vdub needs to make a YV12->RGB conversion for it's preview image. For this conversion, does it assume that the YV12 material is Rec.601?
In this case, if I process Rec.709 material in my AviSynth script, make a ColorMatrix() call along the line and feed it into Vdub, it would display correctly, right? If I process Rec.709 material, make a ColorMatrix() call that converts it to Rec.601 and a ConvertToRGB() at the end and open this in Vdub, it would give the same result, right? And if I process Rec.709 material and just do ConvertToRGB(Rec709) before handing it to Vdub, it would also be the same, yes? The maximum differences i got from screenshots of vdub's display of these three cases was 3 (for RGB values in the 20-30 area), so i was wondering whether these are still due to rounding errors or whether my assumptions above are just wrong.. And, yes, which of the three method's display to trust most for proof viewing the output of a filter chain..? Edit: I was using VirtualDubMod, not VirtualDub. Last edited by rig_veda; 8th August 2006 at 22:21. |
9th August 2006, 19:31 | #224 | Link | |||||
Moderator
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
|
Quote:
Quote:
Quote:
Quote:
Quote:
When using ColorMatrix and ConvertToRGB (VDub routines), you will make two rounding erros. |
|||||
17th August 2006, 00:35 | #225 | Link | |
Registered User
Join Date: Oct 2001
Location: Italia
Posts: 412
|
Quote:
If PC DVD Players show movies with the "right" brighteness and they almost always use overlay card function as well why MPEG4 DirectShow decoders can't simply dial with the overlay subsystem by simply imparting the same YUV->RGB color conversion scheme? When we see a movie in our PC, most of times we see it through overlay output method. AFAIK "overlay" involves direct video card conversion of YUY2 / YV12 data *directly* into analog RGB signals. (that's the reason because overlay mode exists, this makes a lot of difference on (analog) CRT displays) IMHO this is better than manipulate YV12 data and than involve some erratic pixel requantization. (16-235 --> 0-255) |
|
17th August 2006, 01:58 | #226 | Link |
Angel of Night
Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,559
|
Because the pc-playback streams suck and don't include any form of flagging for this. Same problem, but much worse, with tv/pc yuv translation. A simple bitflag for tv/pc would give decoders & renderers a way to correctly decode everything, instead of essentially randomly picking one method and destroying video that doesn't fit its mold. In this case, adding the colorometry flag of mpeg2 to mp4/mkv, or mpeg4 asp/avc raw streams would be a better way, but afaik it isn't there at all, and good luck calling up ISO and asking them to throw it in.
|
4th September 2006, 22:41 | #227 | Link | |
Registered User
Join Date: Nov 2003
Posts: 148
|
hi,
many thanks for your work on colormatrix! but i have 2 questions. regarding to this line from manual: Quote:
second: if i process an avs script within avisynth and save a frame as rgb-bitmap, i got the full pc-scale on luma and corrected color. uhm.. ? greetings. |
|
4th September 2006, 22:46 | #228 | Link | |
Registered User
Join Date: Nov 2003
Posts: 148
|
Hi,
many thanks for the working on colormatrix. i have 2 questions regarding to the following line in the docu: Quote:
2. if i open an avs script with colormatrix within virtualdub and save a frame as rgb bitmap, i got the full luma range [0,255] - exactly what i want to have, but in opposite to the docu ? btw: HCEnc is using ITU-R BT.709 colormetry already. so i have (not) to use it for hcenc in the opposite way than xvid, right ? greetings. Last edited by Heini011; 5th September 2006 at 12:20. |
|
5th September 2006, 20:18 | #229 | Link | ||||
Moderator
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
|
Quote:
Quote:
Quote:
Quote:
|
||||
18th September 2006, 13:21 | #231 | Link |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,391
|
Can't decide if that makes sense at all ... but if you desperately must have it, you can do like
Code:
a = last b = a.ColorMatrix() c = mt_lutxy(a,b, yexpr="x 16 < x 235 > | x y ?", \ uexpr="x 16 < x 240 > | x y ?", \ vexpr="x 16 < x 240 > | x y ?", U=3,V=3)
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
23rd September 2006, 09:56 | #234 | Link |
Registered User
Join Date: Feb 2004
Location: NTSC R1
Posts: 2,046
|
Only if the MPEG-2 coefficients are different, which is rare. Use it with hints=true so that it is applied only if needed. Also, make sure you call ColorMatrix first before any other filter for the hints to work.
__________________
|
24th September 2006, 21:40 | #235 | Link | |
Moderator
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
|
Quote:
|
|
28th September 2006, 08:47 | #236 | Link | |||
Registered User
Join Date: Feb 2006
Posts: 1,076
|
Quote:
Quote:
Quote:
These three posts got me to thinking about the way DVD-RB opens its DVD files. This because DVD-RB uses all kinds of encoders, inclusing CCE and Procoder. To stream files to the encoders it generates an AviSynth script that ends with “ConvertToYUY2()”. At the moment it works like this: Code:
Mpeg2Source (“<file>”, div.options) <some further script options (resizing of instance)> ConvertToYUY2() Wouldn’t it be wise to use colormatrix in DVD-RB, when opening files ? Like this: Code:
Mpeg2Source (“<file>”, div.options, info=3) Colormatrix (hints=true) <from here script as usual> ConvertToYUY2() Posting is @ : http://forum.doom9.org/showthread.ph...894#post879894 Last edited by G_M_C; 28th September 2006 at 08:53. |
|||
28th September 2006, 14:09 | #237 | Link | |
Registered User
Join Date: Feb 2004
Location: NTSC R1
Posts: 2,046
|
Quote:
Right way is : Mpeg2Source (“<file>”, div.options, info=3) Colormatrix (mode="Rec.601->Rec.709", hints=true) It would be wise to do this by default for the most part, yes. But not all DVDs are Rec.709 and also there is an overhead in checking for hints every time. I think it should remain optional.
__________________
|
|
28th September 2006, 20:59 | #238 | Link |
Moderator
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
|
@G_M_C,
These coefficients are only used in a RGB<->YUV conversion, thus not in a YV12<->YUY2 conversion (which you are dealing with when using DVD-RB). ConvertToYUY2(matrix="rec709") might be needed when requesting RGB (by using upConv=2) from MPEG2Source. I say "might" because i'm not sure what coefficients are used by MPEG2Source to convert to RGB24. @Neuron2, Are the coefficients autodetected and used when requesting RGB24 from MPEG2Source? Last edited by Wilbert; 28th September 2006 at 21:02. |
29th September 2006, 05:20 | #239 | Link |
Registered User
Join Date: Dec 2002
Location: Uruguay
Posts: 21
|
Ok I finished reading the whole post (It`s quite large..) didn´t find answer to my problem... So I`ll be testing tomorrow...
I have PAL DV edited at premiere exported to huffyuv PAL AVI then loaded in avisyth and converted to NTSC ... Script is being modified now but it used to start with ConverttoYU2() before smoothdeinterlace was applied.... In the end it was fed to CCE... watching tha0 .avs in video player (BS player media playe.. winap.. all teh same.) played the correct levels... The CCE Mpeg 2 file produced VERY distorted levels (No noticeable change using 0-255 or 16-235) Changed CCe to "Try to use RGB" and I get the correct levels (now 0-255 and 16-235 are different also) but Encoding is slower. Tried using ColorMatrix() with several different options... (i.e 6to7 and 7to6) and it doesn´t seem to affect the cce encoding. Colormatrix() line is placed rigth after the resize... NOTES: when I say "No noticealbe change" it actually means "It`s 2 in the morning and I do not have time to actually pay attention to minor changes" and when it says "VERY distorted" I really mean VERY distorted like oversaturated and really darker... I`ll send some pics tomorrow and if I find out what the f**k`s going on I`ll let you know. Please apologize my english It`s not the best it can get but hey... Ive been working for the last 48 ours straight and Im really tired. |
4th October 2006, 09:36 | #240 | Link |
Registered User
Join Date: Dec 2003
Location: MO, US
Posts: 999
|
@Wilbert
With upConv=2, dgdecode does detect and use the coefficients indicated by the matrix_coefficients value to perform the conversion to rgb. (This is not the case for previous mpeg2decx.dlls that could deliver rgb). |
Tags |
colormatrix |
|
|