color difference using Watermark filter to overlay image

Here you can submit bugreports
User avatar
FranceBB
Posts: 230
Joined: Sat Jun 25, 2016 3:43 pm
Contact:

Re: color difference using Watermark filter to overlay image

Post by FranceBB »

It depends.
Even if they have the same colormatrix, transfer and primaries, namely BT709, there's still the range question as you said.
I assume Photoshop is outputting by default a full range RGB so Premiere should be set to output a full range (PC Range) video too. If that's the case, I think you can get away without a conversion, otherwise I'm afraid you still need to add the conversion node... :(
Still, such a conversion in Avisynth through FFAStrans should be fairly fast anyway, so you're good.

I'm not really familiar with Premiere (AVID user like monocampo here :P ), but I'm pretty sure there's an option somewhere to output a full range (PC Range) file. If you can find it, you're gonna be alright. :)
User avatar
renevane
Posts: 12
Joined: Sun Jul 18, 2021 8:47 am
Location: Netherlands

Re: color difference using Watermark filter to overlay image

Post by renevane »

FranceBB wrote: Wed Sep 01, 2021 10:14 pm I assume Photoshop is outputting by default a full range RGB so Premiere should be set to output a full range (PC Range) video too
Understand, but how about if the overlay image is also in the 709 color space?
User avatar
FranceBB
Posts: 230
Joined: Sat Jun 25, 2016 3:43 pm
Contact:

Re: color difference using Watermark filter to overlay image

Post by FranceBB »

I think we're saying the same thing, just not getting each other xD
If you mean they're both Limited TV Range in Linear BT709 then sure, you can definitely do it without any conversion. :)


But... just to make them even more clear... a video or an image have three things:

1) A color matrix
2) A color transfer (color curve)
3) A color primaries

We're gonna focus on the first one.
So basically a picture (or a video, those two are interchangeable as a video is made of frames, so pictures) can be in: BT601, BT709, BT2020.
Those three are color matrices and the values are used to represent colors inside; each one has its own characteristic and is employed in certain scenarios.

Now, when it comes to the color space we can have:

1) RGB24
2) YUV 4:4:4 (yv24)
3) YUV 4:2:2 (yv16) and its interleaved version YUY2 but we'll leave that one alone
4) YUV 4:2:0 (yv12)

and technically other things like 4:2:1, 4:1:1, 4:1:0, 3:1:1 and other weird things, but we'll leave them alone by now.

That is the chroma sampling which tells us how many samples of luma are there compared to the sample of chroma.
For instance, in yv24 there are as many sample of luma as sample of chroma, so if we have let's say a FULL HD 1920x1080 frame, we're gonna have the luma at 1920x1080 and the chroma at 1920x1080 as well, so both are full resolution.
Now, since the human eye has more cones than rods, we perceive the luma far more than chroma, so the vast majority of transmissions etc are in yv12, so 4:2:0, therefore we would have 1920x1080 luma but 960x540 chroma.
In RGB Luma and Chroma are always the same size, so RGB is like saying yv24, so 4:4:4, in fact one could easily see the "24" in ConverttoRGB24() as the 24 in Converttoyv24().

Diving further we have Limited Range vs Full Range.

1) Limited TV Range
2) Full PC Range

Inside the signal we can have the representation as Limited TV Range or Full PC Range.
For 8bit a Limited TV Range it means that the signal is gonna go from 0.0 to 0.7V, namely 16-235, while in Full PC Range the signal is gonna go from 0 to 255.
For 10bit is 64-940 for Limited TV Range and 0-1020 for Full PC Range and so on:

Image

This picture I took in Berlin several years ago for instance is in Full Range as you can see in the waveform monitor (top right) that it goes outside the brown region:

Image

This picture a friend of mine took in a church in Italy where he brought his child is instead in Limited TV Range as you can see it's within the brown parenthesis:

Image


So, in the end, to reply to your question, you can put in "Overlay" an image but in order to avoid any conversion, as things currently stands, both the video and the image have to be:

1) Both in BT601 Limited TV Range
2) Both in BT601 Full PC Range
3) Both in BT709 Limited TV Range
4) Both in BT709 Full PC Range
5) Both in BT2020 Limited TV Range
6) Both in BT2020 Full PC Range

About the sampling, it doesn't matter if one is in yv12 and the other in yv16 or one in yv24 and the other in RGB etc, but the important thing is that they're both with the same color matrix/primaries and in the same range, otherwise they're not gonna match.
momocampo
Posts: 592
Joined: Thu Jun 08, 2017 12:36 pm
Location: France-Paris

Re: color difference using Watermark filter to overlay image

Post by momocampo »

Thank you Franck, that's we call a really good topic and a great explanation!
Well done.
;)
B.
Ghtais
Posts: 157
Joined: Thu Jan 19, 2017 11:06 am

Re: color difference using Watermark filter to overlay image

Post by Ghtais »

thank you !
User avatar
renevane
Posts: 12
Joined: Sun Jul 18, 2021 8:47 am
Location: Netherlands

Re: color difference using Watermark filter to overlay image

Post by renevane »

:idea: This is a great read! Thank you so much for taking the time to explain. Highly appreciated.
Post Reply