Bryan Worsley wrote:Thanks Martin, yes, explicit -vf scale=in_color_matrix=bt709:out_color_matrix=bt709 was the missing piece.
i stumbled over this issue myself a few days ago, when i was writing a few little jupyter notebooks, which wanted to send you as inspiration, how this kind of research can by handled by alternative means. but at the end i always had to realize, that they will not help you in practice, so i threw them away again. either you are already familiar with programming and this kind of schematic demonstrations, than it's absolute superfluous trivial stuff, or you are not used to this kind of approaches, than it's again an useless overload of information...
nevertheless i'll send to this time one of these set aside
notebooks and an easier viewable
html-version for the original output of resolves color generator and the
first generation of rereading the file.
based on this evaluations, i would also guess, that the issue seems to be related to 4:2:2 input processing.
btw. you always have to take care, that the output resolution in resolve doesn't differ from the timeline resolution, otherwise you'll see similar nasty artifacts even in 4:4:4 resp. uncompressed RGB image sequence workflows!
Bryan Worsley wrote:That sorted, I ran a series of four r210>v210>r210 conversions cycles with FFMPEG using the EBU Color Bars exported to r210 (Uncomp.10-bit RGB) as source. Metric analysis on the r210 encodes revealed negligible quality loss (SSIM 0.9999) over the 4 cycles.
that's an expected result, because this kind of generative loss evaluations are very often utilized in exactly this manner to testify video compression solutions etc. and the results usually look much more acceptable than your resolve findings.
Bryan Worsley wrote:Those PSNR scores for the UV chroma are extremely low - as has been noted before. And of course when the files were brought back into Resolve the chroma degradation was visible as aberrations on the RGB Histograms.
yes -- the numbers may look very well and the generative loss doesn't increase over additional iterative recompression, but this doesn't strictly imply, that resolves behavior couldn't make sense in respect to other demands. this image filtering and refinement techniques are a really complicated topic, and the simple solutions, which are used in ffmpeg, may not always lead to the most convincing practical results as well, although they look very plausible and technically satisfaying at first sight.
for example: a very simple 'nearest neighbor' scaling algorithm will also have some interesting characteristics and benefits in comparison to more complicated scaling filter solutions. e.g. you will never find any new values in the histogram and will look more correct in this respect. it also may give even better better looking results on some patterns and scaling factor then the other alternatives. nevertheless you would hardly ever use this scaling approach in any serious graphic workflow, for all the well known reasons. and very similar arguments could expressed about the pros and cons of different color subsampling methods.
Bryan Worsley wrote:Martin, is it possible to do the v210 re-coding via 32-bit float RGB with FFMPEG ? If so, how ? Logically, that would be a more relevant comparison.
i definitely would suggest natron as an intermediate step to realize this kind of experiments. it uses the ffmpeg libraries to import the uncompressed YCbCr values but does all further computing in 32bit float RGB till it exports the video again by help of ffmpeg in the same reliable manner. there you will also find accurate implemented RGB->rec.709 and rec.709->RGB nodes, if you want to study the YUV values resp. channel representations. ffmpeg itself IMHO isn't very suitable for this more advanced demands.