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 > General > DVD2AVI / DGIndex

Reply
 
Thread Tools Search this Thread Display Modes
Old 21st February 2005, 01:04   #21  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
Quote:
Scale setting is not used AT ALL unless DGDecode is outputing an RGB frame.
Yup.

Quote:
Which means DGDecode normally outputs unclamped 0-255 full range.
Nope, it outputs [16,235] YUV (in all cases).

Quote:
If an RBG frame is output then the scale setting is applied as follows: PC -> 0-255 (unclamped) or, TV -> 16-235/240 (clamped)
Yup, at least in the following way. If you use DGDecode's color conversion routines (YUVtoRGB):

TV-scale: YUV [16,235] -> RGB [16,235]

PC-scale: YUV [16,235] -> RGB [0,255].

Like i said in

http://forum.doom9.org/showthread.php?s=&threadid=87811

I also said it doesn't seem to work with vfapi 1.05/TMPGEnc (btw, i guess i forgot to use DGVfapi.vfp, have to check that).

Last edited by Wilbert; 21st February 2005 at 01:06.
Wilbert is offline   Reply With Quote
Old 21st February 2005, 01:38   #22  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
IIRC, VFAPI forces PC scale, while the 3rd-party access function follows the setting.
Guest is offline   Reply With Quote
Old 21st February 2005, 11:49   #23  |  Link
Spyn
Registered User
 
Join Date: Mar 2004
Location: france
Posts: 98
if dgdecode use reduced 16-235 in all cases when output YUV frames, why when scripting the .d2v in a .avs file and open this avs with vdubmod it look to be 0-255 ?

here is 16-235 :



but vdub show 0-255 in all cases :



if Dgdecode output 16-235 for YUV, there is inevitably a conversion from 16-235 to 0-255 somewhere.

vdubmod don't change the colorspace by choosing fast recompress and my encoded movies are 0-255 too so i think there is no colorconversion in all the process.

in conclusion, i think dgdecode output 0-255 for YUV frames.
Spyn is offline   Reply With Quote
Old 21st February 2005, 14:46   #24  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
I already told you that you can't use VDub's display. How do you know that your encoded movie is PC scale?
Guest is offline   Reply With Quote
Old 21st February 2005, 16:19   #25  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
Quote:
in conclusion, i think dgdecode output 0-255 for YUV frames.
Nope, sorry.

Quote:
if Dgdecode output 16-235 for YUV, there is inevitably a conversion from 16-235 to 0-255 somewhere.

vdubmod don't change the colorspace by choosing fast recompress and my encoded movies are 0-255 too so i think there is no colorconversion in all the process.
VDub converts it to RGB [0,255] for displaying only (as neuron2 is trying to say), but it passes the YUV [16,235] to the codec.
Wilbert is offline   Reply With Quote
Old 21st February 2005, 20:51   #26  |  Link
Spyn
Registered User
 
Join Date: Mar 2004
Location: france
Posts: 98
Quote:
Originally posted by Wilbert
Nope, sorry.


VDub converts it to RGB [0,255] for displaying only (as neuron2 is trying to say), but it passes the YUV [16,235] to the codec.
here is a screenshot of the encoded movie from media player classic :



here is a screenshot of the same encoded movie from vdubmod :



and here is a screenshot from dgindex using tv scale (16-235) before encoding :



the movie has been encode with a .d2v file created using tv scale and with vdub using fast recompress (no colorspace change)

media player classic show that the movie is 0-255 and i don't think media player classic do any color conversion ?

Last edited by Spyn; 21st February 2005 at 21:01.
Spyn is offline   Reply With Quote
Old 21st February 2005, 22:36   #27  |  Link
KaiserS
Guest
 
Posts: n/a
Quote:
Originally posted by Spyn
media player classic show that the movie is 0-255 and i don't think media player classic do any color conversion ?
Open your encoded movie with an Avisynth script with ColorYUV(analyze=true) in it and make a screenshot from that in vdub. Rather then trying to estimate with your eye, this will tell you exactly what the luma scale is.

Last edited by KaiserS; 21st February 2005 at 22:46.
  Reply With Quote
Old 21st February 2005, 22:45   #28  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
Quote:
media player classic show that the movie is 0-255 and i don't think media player classic do any color conversion ?
Your monitor displays RGB. So, there's always a color conversion to RGB. I guess MPC uses its own color conversion routines, just like VirtualDubMod does when opening a vob.
Wilbert is offline   Reply With Quote
Old 21st February 2005, 23:13   #29  |  Link
Spyn
Registered User
 
Join Date: Mar 2004
Location: france
Posts: 98
Quote:
Originally posted by KaiserS
Open your encoded movie with an Avisynth script with ColorYUV(analyze=true) in it and make a screenshot from that in vdub. Rather then trying to estimate with your eye, this will tell you exactly what the luma scale is.
i find frames with a luma minimum of 0 and others with a lum maximum of 254

all players play the movie with 0-255 range expect bsplayer who use 16-235

who lie...
Spyn is offline   Reply With Quote
Old 21st February 2005, 23:45   #30  |  Link
KaiserS
Guest
 
Posts: n/a
Quote:
Originally posted by Spyn
i find frames with a luma minimum of 0 and others with a lum maximum of 254
Can you post a screenshot? Secondly, what codec are you encoding to? If it uses a YUV colorspace it will have to have a luma range of 16-235.
  Reply With Quote
Old 22nd February 2005, 00:39   #31  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
Just put coloryuv in the avs after DGDecode:

mpeg2source("file.d2v")
coloryuv(analyze=true)

Strangely, it does show minimum 0/maximum 255!

I will investigate.

Spyn, you can stop posting all the big screenshots now.
Guest is offline   Reply With Quote
Old 22nd February 2005, 00:44   #32  |  Link
Spyn
Registered User
 
Join Date: Mar 2004
Location: france
Posts: 98
Quote:
Originally posted by KaiserS
Can you post a screenshot? Secondly, what codec are you encoding to? If it uses a YUV colorspace it will have to have a luma range of 16-235.
no i can't neuron2 say stop and he got same result

i use xvid 1.0.3
Spyn is offline   Reply With Quote
Old 22nd February 2005, 00:54   #33  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
@KaiserS

mpeg2source("file.d2v")
coloryuv(analyze=true)

This shows max 255, min 0. There's nothing else involved.
Guest is offline   Reply With Quote
Old 22nd February 2005, 00:56   #34  |  Link
KaiserS
Guest
 
Posts: n/a
Well I was talking about his encoded file, which he said was using PC scale as well, not the d2v source itself. The xvid encode shouldn't have PC scale as IIRC it clips the luma range to TV scale.

Last edited by KaiserS; 22nd February 2005 at 01:02.
  Reply With Quote
Old 22nd February 2005, 12:09   #35  |  Link
Spyn
Registered User
 
Join Date: Mar 2004
Location: france
Posts: 98
Quote:
Originally posted by KaiserS
Well I was talking about his encoded file, which he said was using PC scale as well, not the d2v source itself. The xvid encode shouldn't have PC scale as IIRC it clips the luma range to TV scale.
sorry neuron2



this is an xvid movie, avs :

AviSource("H:\le_jour_d_apres.avi")
ColorYUV(analyze=true)

what mean loose minimum and loose maximum ?
Spyn is offline   Reply With Quote
Old 22nd February 2005, 15:22   #36  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
Loose min means that 255/256 of all luma values lie above the loose minimum (loose max similar).

Strange, like KaiserS, XviD should clamp it to [16,235]. I guess it's time to do some tests again.
Wilbert is offline   Reply With Quote
Old 22nd February 2005, 21:47   #37  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
Quote:
Strange, like KaiserS, XviD should clamp it to [16,235]. I guess it's time to do some tests again.
Ok, did some tests with AviSynth (with luma=0 and luma=8) and XviD (Koepi's 1.1):

1) XviD does NOT clamp when requesting YUV (it just returns YUV [0,255]).

2) It does 'clamp to YUV [16,235] prior conversion to RGB' when requesting RGB from the codec (using AviSource("Y8.avi",pixel_type="RGB24")) for example.
Wilbert is offline   Reply With Quote
Old 26th February 2005, 00:23   #38  |  Link
Cyberia
Moderator
 
Cyberia's Avatar
 
Join Date: Nov 2002
Location: Inside
Posts: 718
I have updated Q07 of the FAQ to reflect the clarifications in this thread. Still waiting on final reports from neuron2 and wilbert on the strange behavior described towards the end of the thread.


Q07: What does the "YUV -> RGB" option do?
A:
First, understand that this option is ONLY used in two cases: when you use DGDecode's internal RGB conversion filters, or when a 3rd-party application, such as Gordian Knot or VFAPI, requests an RGB frame.

In short, use PC Scale if you are going to mainly watch the final video on a PC, and TV Scale if you mainly are going to watch it on a TV.

PC-scale: YUV [16,235] -> RGB [0, 255]
TV-scale: YUV [16,235] -> RGB [16, 235/240]
Cyberia is offline   Reply With Quote
Old 26th February 2005, 02:05   #39  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
Quote:
TV-scale: YUV [16,235] -> RGB [16, 235/240]
TV-scale: YUV [16,235/240] -> RGB [16, 235]
(240 refers to the chroma of course)

Quote:
In short, use PC Scale if you are going to mainly watch the final video on a PC, and TV Scale if you mainly are going to watch it on a TV.
I know people say this, but I disagree. Imo, it has nothing to do when you will be watching it on tv or pc. Whether you encode to mpeg4 or mpeg2 i always would use PC-scale.

Ok, when would you use TV-scale? Well never, but you can use it in the following theoretic cases:

1) Open the d2v file in TMPGEnc and check the "Output YUV data as Basic YCbCr not CCIR601" option (which is UNchecked by default). In this case the RGB->YUV conversion will be done preserving the luma range.

2) I guess CCE will do this similarly when feeding RGB and checking "luminance level 0 to 255". Since you are feeding RGB [16,235], it will map to YUV [16,235]. I guess, i don't have CCE, so i never tried it.

I can't think of any other case.
Wilbert is offline   Reply With Quote
Old 26th February 2005, 02:27   #40  |  Link
Cyberia
Moderator
 
Cyberia's Avatar
 
Join Date: Nov 2002
Location: Inside
Posts: 718
Quote:
Originally posted by Wilbert
TV-scale: YUV [16,235/240] -> RGB [16, 235]
(240 refers to the chroma of course)
PC Scale: YUV [16,235(Y)/240(UV)] -> RGB [0, 255]
TV Scale: YUV [16,235(Y)/240(UV)] -> RGB [16, 235]

Correct?
Cyberia 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 10:11.


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