I have been reading a lot of posts and a special one which deals with exactly that problem of Cspace conversions and especially Tmpgenc/CCE.
The resumeé is:
Conversions between all YUV format like YV12 and YUY2 wont touch the luma range. BUT if a conversion is done between YUV and RGB in avsiynth the luma will be "stretched" to 0-255 or othewiese "cutted" to 16-235. Thats the case IF NO additional coefficient parameters are set in the ConverttoXXX() command!
http://www.avisynth.org/Convert
The first risk is WHAT vfw codec is used when loading a video source into avisynth via Avisource(). Here already some codecs do stretch or expand or cut, so every codec model gots his own way of handling.
mpeg2dec3 by MarcFD doesnt touch the luma range, so a perfect 16-235 DVD in avisynth is kept by the mpeg2source command. Also a 0-255 DVD is kept at 0-255.
Lets see what happens:
A simple d2v file in a 16-235 Luma rangeout of a DVD will be imported into avisynth, no conversion etc., so YV12 is still the result out of the script:
mpeg2source("16-235.d2v")
Result:
TmpgEnc with CCIR option enabled = Cant be specified as all lays on the decoder in the system which handles the YV12 to RGB24 conversion, means mega Tricky as its individual codec specific if the luma range is kept or scaled!
TmpgEnc NO CCIR option enabled = Same as above!
mpeg2source("16-235.d2v")
ConverttoRGB24()
This causes a 16-235 to 0-255 expanding due a default YUVtoRGB Cspace conversion in avisynth when using NO coefficient parameters in the converttoXXX() command.
Result:
TmpgEnc with CCIR option enabled = Correct output! as the luma range of 0-255 will be "copressed"!! (not cropped!) to 16-235.
TmpgEnc No CCIR option enabled = 0-255 input is kept as NO luma modification is done! Whaterver comes in, it will be encoded untouched, means 16-235 stays 16-235, 0-255 stays 0-255!
Conclusion on TmpgEnc:
If you use Converttorgb24() and the CCIR option in TmpgEnc the luma will be expanded and compressed within the whole video-job. To me thats not they 100% way, better staying totally at 16-235 by converting to RGB24 using the convertto parameter to KEEP the luma 16-235! Afterwards NO CCIR option checked and you get a NON Luma touched encoding of your source.
But what happens if going with a YV12 (16-235) Cspace into TmpgEnc?? As said thats tricky AS if the decoder (YV12 to RGB24) used by the system KEEPS the 16-235 range when decoding TO rgb24 you will get a too bright encoding IF then CCIR is checked as CCIR option in TmpgEnc DOES compress the luma no matter which luma range comes in.
Now, CCE:
Very easy ALL YUV inputs will be untouched! No matter if "16-235" option in CCE settings is set or not, as that option ONLY affects RGB feeded to the CCE.
SO imho limiter() at the end makes no sense as anyway we use converttorgb24() which stretches the luma back to 0-255. Also in case if NO converttorgb24() is included as by that 2 possibilities are given:
1. The system decoder keeps the 16-255 (out of limiter()) and a CCIR based encoding in TmpgEnc will brighten too much the encoding.
2. The system decoder expands the 16-255 (out of limiter()) to 0-255 and a CCIR based encoding in TmpgEnc will result correctly.
But now there will be the question
"Hmmmm If my original already IS 0-255 the converttorgb24() by this will expand my already 0-255 OUT of the range?? As the command just uses an internal FIX math??? So luma cropping via limiter() BEFORE converting to rgb for me is a MUST!"
Logically seen thats like a luma cropping where afterwards in TmpgEnc the "scaling" to CCIR also here will result like if it would have been cropped to 16-235

So that would be THE SAME result as if you would use limiter() ... means also here in the script no limiter is needed.