You are very welcome Harmy :-)
I used your UtVideo RGB sample and loaded it in avisynth using FFVideoSource. The video has to be indexed first of course. This is the avisynth script:
LoadPlugin("C:\Program Files\MeGUI\tools\ffms\ffms2.dll")
FFVideoSource("E:\star wars\Leia-RGB-sample.avi", threads=1)
ConvertToYV12(matrix="rec709")
The only magic is to add matrix="rec709", which makes sure the output uses HD color space BT709 with limited TV range, meaning 16-235.
The x264 commandline had the following options checked as well, but I think it works correctly if you leave them out:
--colorprim "bt709" --transfer "bt709" --colormatrix "bt709"
These are the options to use for HD releases. For the DVD one should first resize in RGB and then convert to REC601 using the colormatrix plugin for avisynth. The reason is that most players/decoders will assume the colorspace based on the video resolution. So it must be set accordingly, otherwise the decoder assumes the wrong one and you get color shifts during playback.
Unfortunately UtVideo codec does not allow to specify rec709 when rendering to YUV420. Maybe there's an option in Premiere for that?