I think that the following is correct, but I want to make sure. I need to convert from Rec.709 to RGB24 and expand the luma range, so I use this:
Then I can work in RGB. As I understand it, Rec.709 and Rec.601 only relate to YUV. Once one has converted to RGB correctly, there is no longer a distinction, so I can work in RGB and then convert to Rec.601 using this:Code:ConverttoRGB24(matrix="pc.709")
Does anyone know if HCenc converts YV12 to YUY2 internally? If it does, it might be better to use ConverttoYUY2() because HCenc certainly accepts YUY2 as input.Code:ConverttoYV12()#compresses luma range and assumes Rec.601
On a related note, given a Rec.709 YUV source, is
the same asCode:ConvertToYUY2(matrix="rec709")#keeps the luma in the TV range
and if not, which would people recommend. (I am not really concerned with the clamp parameter: I want to know if the overall conversion produces the same result.) Thanks for any help. I am nearly clear on this sort of thing.Code:Colormatrix(mode="rec.709->rec.601",clamp=0) Convertoyuy2()
+ Reply to Thread
Results 1 to 9 of 9
-
Anonymous344Guest
Last edited by Anonymous344; 2nd May 2011 at 15:47.
-
Not quite; Rec601/709 refers whenever conversions are done between RGB<=>YUV
If you don't specify a matrix in avisynth, Rec.601 is used
Other way around; It accepts YUY2 or YV12 input and outputs YV12 . (You can export YUY2 also, but this is invalid for DVD)
No it doesn't, assuming your source is RGB, the 1st converts RGB to YUY2 using rec709 matrixOn a related note, is
the same asCode:ConvertToYUY2(matrix="rec709")#keeps the luma in the TV range
and if not, which would people recommend. (I am not really concerned with the clamp parameter: I want to know if the overall conversion produces the same result.) Thanks for any help. I am nearly clear on this sort of thing.Code:Colormatrix(mode="rec.709->rec.601",clamp=0) Convertoyuy2()
The 2nd depends on how you converted RGB to YUV (colormatrix doesn't work on RGB) -
Anonymous344Guest
Thanks for your help, poisonsdeathray. : )
Sorry, I was unclear. I know that HCenc accepts YUY2 or YV12 input, and that it outputs YV12 (assuming DVD output). I was wondering if HCenc converts YV12 input to YUY2 internally and then downsamples again when it outputs YV12.Other way around; It accepts YUY2 or YV12 input and outputs YV12 . (You can export YUY2 also, but this is invalid for DVD)
Yeah, I'm clear on the above. What I want to know is once you have converted to RGB is all RGB is the same i.e. if you have a Rec.709 source and convert it to RGB would it be qualitatively different from a Rec.601 source converted to RGB (leaving aside luma ranges and alpha channels for a moment)? (There are no vestiges of the video having been rec.709 originally left, so when you have finished working in RGB you can convert to whatever YUV colorspace you like.)Not quite; Rec601/709 refers whenever conversions are done between RGB<=>YUV If you don't specify a matrix in avisynth, Rec.601 is used
Sorry, I didn't envisage an RGB source. I envisaged a Rec.709 one being converted to YUY2. When I said on a related note, I was trying to distance this part from the first half of the post. I was just trying to avoid starting a thread for every question I have.No it doesn't, assuming your source is RGB, the 1st converts RGB to YUY2 using rec709 matrix
The 2nd depends on how you converted RGB to YUV (colormatrix doesn't work on RGB)
Last edited by Anonymous344; 2nd May 2011 at 15:16.
-
I doubt it, but if you want to be sure ask Hank at Doom9 forum
RGB is RGB (brilliant logic there on my partWhat I want to know is once you have converted to RGB is all RGB is the same i.e. if you have a Rec.709 source and convert it to RGB would it be qualitatively different from a Rec.601 source converted to RGB (leaving aside luma ranges and alpha channels for a moment)? (There are no vestiges of the video having been rec.709 originally left, so when you have finished working in RGB you can convert to whatever YUV colorspace you like.)
); that is - what you see on the monitor/TV is RGB
How you convert to RGB determines whether or not you get the same thing. If you converted with proper matrix you get the same thing (nearly; there are rounding differences)
If you start with Rec.709 YV12 source, and use ConvertToYUY2() , it's still Rec.709 because you are still in YUV (and again by "Rec.709 YV12 Source " I mean originally RGB but converted to YUV using Rec709)Sorry, I didn't envisage an RGB source. I envisaged a Rec.709 one being converted to YUY2. When I said on a related note, I was trying to distance this part from the first half of the post. I was just trying to avoid starting a thread for every question I have.
Remember this and you won't go wrong:
The matrix only takes effect when you do RGB<=>YUV conversions
Colormatrix() filter is unique because it can do changes in YUV (staying in YUV) -
Anonymous344GuestAh, so YUY2 can be either Rec.709 or Rec.601! I wasn't sure that it could be. I thought perhaps that these distinctions only applied to YV12.If you start with Rec.709 YV12 source, and use ConvertToYUY2() , it's still Rec.709 because you are still in YUV
Thanks! So when used on a Rec.709 source, ConverttoYUY2() doesn't assume Rec.601 coefficients, as it does with an RGB source. That helps greatly. In that case, hypothetically, if I had a Rec.709 source and Rec.601 source and wanted to work in YUY2 and splice them together I would have to use colormatrix(mode="rec.709->rec.601") on the former, then ConverttoYUY2() and then splice them. Got it! Thanks again.Remember this and you won't go wrong:
The matrix only takes effect when you do RGB<=>YUV conversions
-
To be more precise, Rec601/709 only refers to how that YUV video was derived. ie. what matrix was used to convert from the original RGB source to YUV to make that video. The RGB might be a master format. As an end user, you usually only have access to YUV video (e.g. DVD, blu-ray, HDTV caps)
Correct, it does nothing in terms of colorimetry, because YUV=>YUVSo when used on a Rec.709 source, ConverttoYUY2() doesn't assume Rec.601 coefficients, as it does with an RGB source. That helps greatly.Remember this and you won't go wrong:
The matrix only takes effect when you do RGB<=>YUV conversions
Yes that would work, assuming everything was done correctly prior to thatIn that case, hypothetically, if I had a Rec.709 source and Rec.601 source and wanted to work in YUY2 and splice them together I would have to use colormatrix(mode="rec.709->rec.601") on the former, then ConverttoYUY2() and then splice them. Got it!
-
Anonymous344GuestI see. These would be the 4:4:4 RGB files that are used to edit movies. Thanks for your help. I think I understand now.To be more precise, Rec601/709 only refers to how that YUV video was derived. ie. what matrix was used to convert from the original RGB source to YUV to make that video. The RGB might be a master format. As an end user, you usually only have access to YUV video (e.g. DVD, blu-ray, HDTV caps)
-
If by expand the luma range, you mean go from luma 16-235 to RGB 0-255, then you would use matrix="Rec709".
If you use matrix="pc.709", it will map luma 0-255 to RGB 0-255.
The 'matrix' parameter to the Convert functions is only valid when converting to and from RGB, so you would get an error from the first code.On a related note, given a Rec.709 YUV source, is
the same asCode:ConvertToYUY2(matrix="rec709")#keeps the luma in the TV range
Code:Colormatrix(mode="rec.709->rec.601",clamp=0) Convertoyuy2()
-
Anonymous344Guest
Similar Threads
-
Is there a small test video one can use to test Rec 601 / 709 conversion?
By Asterra in forum Video ConversionReplies: 5Last Post: 19th Jun 2011, 09:28 -
Extract sub's from Toppy .rec
By Rob- in forum SubtitleReplies: 2Last Post: 17th May 2011, 09:35 -
Reds look wrong for Rec.709
By Anonymous344 in forum Newbie / General discussionsReplies: 11Last Post: 23rd Apr 2011, 19:14

Quote

