Video pre-processing - Page 7 - AVS Forum
Forum Jump: 
Reply
 
Thread Tools
post #181 of 212 Old 10-30-2009, 05:17 PM
AVS Special Member
 
madshi's Avatar
 
Join Date: May 2005
Posts: 5,482
Mentioned: 9 Post(s)
Tagged: 0 Thread(s)
Quoted: 70 Post(s)
Liked: 140
Do you know which scaling algorithm is usually used for downscales by studios?
madshi is offline  
Sponsored Links
Advertisement
 
post #182 of 212 Old 10-30-2009, 05:19 PM - Thread Starter
AVS Special Member
 
sspears's Avatar
 
Join Date: Feb 1999
Location: Sammamish, WA, USA
Posts: 5,252
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 19 Post(s)
Liked: 54
There are a zillion companies that do this work for Hollywood. It could be anything from Virtual Dub to Snell & Wilcox.
sspears is offline  
post #183 of 212 Old 10-30-2009, 06:03 PM
 
ChrisWiggles's Avatar
 
Join Date: Nov 2002
Location: Seattle
Posts: 20,730
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 15
Do they downscale in linear-light?
ChrisWiggles is offline  
post #184 of 212 Old 10-31-2009, 05:30 AM
AVS Special Member
 
Kram Sacul's Avatar
 
Join Date: Sep 2003
Location: Los Angeles, CA
Posts: 5,257
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 1 Post(s)
Liked: 10
Quote:
Originally Posted by ChrisWiggles View Post

But I would have to say that the more obvious difference is of course the AR change.

I don't really know how I feel about that, to be honest I think I am more concerned about the AR change frankly. I'm curious how others feel about that.

I don't like the cropping either. You're not only missing the sides but also a bit off the bottom and top to maintain the AR:



I know it's a necessary evil to avoid resizing artifacts but I think in most cases I'd take an ever so slightly softer resized uncropped image over one that was cropped. I just like don't like losing little details on the sides even if they are expendable. I'm weird like that.

Would be interesting to identify transfers on BDs which were resized rather than cropped and simulate how they would look if zoomed in.
Kram Sacul is offline  
post #185 of 212 Old 10-31-2009, 06:02 AM
AVS Special Member
 
JohnAd's Avatar
 
Join Date: Jun 2000
Location: London
Posts: 1,725
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 16
Quote:
Originally Posted by Kram Sacul View Post

I don't like the cropping either. You're not only missing the sides but also a bit off the bottom and top to maintain the AR:

In my imaginary world I'd keep the top and bottom, no point cropping it given you're going to put black bars there instead.

I think I'd still prefer the cropped, especially given the likely lack of deliberate content there anyway, looking at the test pattern I assume the black area is meant to be cropped off.

It also surprised me how little resolution there is on the test pattern. Yes it's twisted slightly but i'd have thought more would come through

John

My Company - Upsilon Software
Free Projects - DScaler & hcfr fork
JohnAd is offline  
post #186 of 212 Old 10-31-2009, 06:08 AM
AVS Special Member
 
JohnAd's Avatar
 
Join Date: Jun 2000
Location: London
Posts: 1,725
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 16
Quote:
Originally Posted by madshi View Post

One thing that I noticed is this in the 2K image:

[image removed]

Is this ringing coming from the 6K -> 2K downscale?

I think the torches were added in later, the torch on the right isn't relected in the window and his face isn't lit by the nearby light. Probably best for the actor's hair...

John

My Company - Upsilon Software
Free Projects - DScaler & hcfr fork
JohnAd is offline  
post #187 of 212 Old 10-31-2009, 09:19 AM
AVS Special Member
 
Mr.D's Avatar
 
Join Date: Dec 2001
Location: UK
Posts: 3,307
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 15
Actually the bulk of the image in that last set you posted is digital matte painting (the cranes and back water). The guy on the right has also been cut out from a later frame and hand warped/animated back from that point.

There was a rather large ramp in the way for the camera bike and an extension platform on the far side of the boat at this point to allow it enough braking space (hence the need for the back matte painting).

digital film janitor
Mr.D is offline  
post #188 of 212 Old 10-31-2009, 12:58 PM
Senior Member
 
yesgrey3's Avatar
 
Join Date: Jul 2004
Posts: 331
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
Originally Posted by sspears View Post

Here are two sample images. Both were captured on film and scanned at 6k.

I believe that the images scanned from film are in linear light, and the gamma encoding is applyed after the scanning. Is this correct?

Quote:
Originally Posted by sspears View Post

I converted from PC levels to video levels. ie black went from 0 to 16.

Why have you converted it to video levels? Are the scanning images in PC levels? I thought that during the scanning they were stored as video levels...
yesgrey3 is offline  
post #189 of 212 Old 10-31-2009, 01:12 PM - Thread Starter
AVS Special Member
 
sspears's Avatar
 
Join Date: Feb 1999
Location: Sammamish, WA, USA
Posts: 5,252
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 19 Post(s)
Liked: 54
Quote:
Why have you converted it to video levels?

The files were delivered in 16-bit TIFF with black at RGB 0 and white at RGB 255.
sspears is offline  
post #190 of 212 Old 11-01-2009, 03:55 AM
AVS Special Member
 
Mr.D's Avatar
 
Join Date: Dec 2001
Location: UK
Posts: 3,307
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 15
Quote:
Originally Posted by yesgrey3 View Post

I believe that the images scanned from film are in linear light, and the gamma encoding is applyed after the scanning. Is this correct?


Why have you converted it to video levels? Are the scanning images in PC levels? I thought that during the scanning they were stored as video levels...

The CCDS used in scanners are inherently linear devices however a film scanner asigns discrete code values to film densities after setup with a densitometer. When it comes off the scanner its usually log. You can specify any gamma or distribution curve you like though including linear and video. There is not much point scanning film to linear though.

I posted a log image in the (is 8 bit enough for video thread). I have to say stacey's scans look very soft to me.

digital film janitor
Mr.D is offline  
post #191 of 212 Old 11-01-2009, 04:24 AM
AVS Special Member
 
Mr.D's Avatar
 
Join Date: Dec 2001
Location: UK
Posts: 3,307
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 15
Quote:
Originally Posted by madshi View Post

Do you know which scaling algorithm is usually used for downscales by studios?

Its often sinc and unfortunately its often overcooked as the scanning facilities got themelves into a sharpness cold war a few years back with clients (most of whom have the visual interogation skills of a hamster) wandering about declaring such and such a company to have better scans than the other so the sharpness started to get cranked up.

I do find Cinesite's scans markedly superior to just about everyone elses.Usually sharper but with minimal ringing.

I usually request blue/green screen plates at 4k to mitigate the ringing against edges. However I only use it for the key as its usually impossible to get an exact visual match to the 2k from the scanning process so I'll use the 2k from the scanning process for the actual image rather than downsize the 4k myself.

digital film janitor
Mr.D is offline  
post #192 of 212 Old 11-01-2009, 04:54 AM
Senior Member
 
yesgrey3's Avatar
 
Join Date: Jul 2004
Posts: 331
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
Originally Posted by Mr.D View Post

The CCDS used in scanners are inherently linear devices however a film scanner asigns discrete code values to film densities after setup with a densitometer. When it comes off the scanner its usually log. You can specify any gamma or distribution curve you like though including linear and video. There is not much point scanning film to linear though.

Yes, I agree, so basically I was right about my assumption, only not so detailed.

I know that the scanning is not performed with 8bit per component (or it shouldn't be), but let's consider it just to simplify my next question...

The scanning is performed for the 3 components, RGB. So, if we choose to specify the video gamma curve (I suppose it's the same considered in BT.709), which are the considered black and white values for applying the gamma encoding? 1/254 or 16/235?
From your description above, it seems to be 1/254...
yesgrey3 is offline  
post #193 of 212 Old 11-01-2009, 05:04 AM
AVS Special Member
 
madshi's Avatar
 
Join Date: May 2005
Posts: 5,482
Mentioned: 9 Post(s)
Tagged: 0 Thread(s)
Quoted: 70 Post(s)
Liked: 140
Quote:
Originally Posted by Mr.D View Post

Its often sinc and unfortunately its often overcooked as the scanning facilities got themelves into a sharpness cold war a few years back with clients (most of whom have the visual interogation skills of a hamster) wandering about declaring such and such a company to have better scans than the other so the sharpness started to get cranked up.

I do find Cinesite's scans markedly superior to just about everyone elses.Usually sharper but with minimal ringing.

I usually request blue/green screen plates at 4k to mitigate the ringing against edges. However I only use it for the key as its usually impossible to get an exact visual match to the 2k from the scanning process so I'll use the 2k from the scanning process for the actual image rather than downsize the 4k myself.

Thanks, that's pretty interesting.

overcooked sinc !!
madshi is offline  
post #194 of 212 Old 11-01-2009, 07:22 PM - Thread Starter
AVS Special Member
 
sspears's Avatar
 
Join Date: Feb 1999
Location: Sammamish, WA, USA
Posts: 5,252
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 19 Post(s)
Liked: 54
Quote:


I have to say stacey's scans look very soft to me.

Might have occured during the 6k to 4k or the 4k to 2k.

Quote:


Its often sinc and unfortunately its often overcooked as the scanning facilities got themelves into a sharpness cold war

The original scan of Baraka was pretty bad. What came out on Blu-ray is the, much improved, re-scan.
sspears is offline  
post #195 of 212 Old 11-02-2009, 04:29 AM
AVS Special Member
 
Mr.D's Avatar
 
Join Date: Dec 2001
Location: UK
Posts: 3,307
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 15
Quote:
Originally Posted by yesgrey3 View Post

Yes, I agree, so basically I was right about my assumption, only not so detailed.

I know that the scanning is not performed with 8bit per component (or it shouldn't be), but let's consider it just to simplify my next question...

The scanning is performed for the 3 components, RGB. So, if we choose to specify the video gamma curve (I suppose it's the same considered in BT.709), which are the considered black and white values for applying the gamma encoding? 1/254 or 16/235?
From your description above, it seems to be 1/254...

The cineon white papers reference 235 as the white pont mapping I think. However the actual process of getting log into video is much more a question of just looking at the log plate and grading it on a video display to produce a pleasing image. This is a little bit difference than a DI where they can reverse the print LUTs with reference to a rec.709 display chain but even then it doesn't work for every shot some have to be essentially regraded into video.

I see video material all the time where they grade pretty much the full dynamic range of the neg into the visible range of the video so working it in terms of black and white point mappings and simple gamma corrections doesn't usually nail it very well.

Have a look at those DLAD images I posted one of them is by the numbers ( 685 white ref mapping to 254 in that case and the appropriate gamma corrections to take 0.6 material to 0.44) Even that has a bit of a softclip dialed in on the whites. The one I graded by eye doesn't employ a white ref mapping. I just lutted the entire range into video essentially by eye to get a pleasing level of contrast without a harsh clip. this is much more like a proper film to video transfer process. I didn't do any color rebalancing though.

digital film janitor
Mr.D is offline  
post #196 of 212 Old 11-02-2009, 04:31 AM
AVS Special Member
 
Mr.D's Avatar
 
Join Date: Dec 2001
Location: UK
Posts: 3,307
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 15
Quote:
Originally Posted by sspears View Post

Might have occured during the 6k to 4k or the 4k to 2k.



The original scan of Baraka was pretty bad. What came out on Blu-ray is the, much improved, re-scan.

The ringing in your scan might be exagerated by a sloppy film to video grade and a bit of compression going on somewhere.

digital film janitor
Mr.D is offline  
post #197 of 212 Old 11-02-2009, 11:29 AM
Senior Member
 
yesgrey3's Avatar
 
Join Date: Jul 2004
Posts: 331
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
Originally Posted by Mr.D View Post

The cineon white papers reference 235 as the white pont mapping I think. However the actual process of getting log into video is much more a question of just looking at the log plate and grading it on a video display to produce a pleasing image.

Quote:
Originally Posted by Mr.D View Post

I just lutted the entire range into video essentially by eye to get a pleasing level of contrast without a harsh clip. this is much more like a proper film to video transfer process. I didn't do any color rebalancing though.

I understand the process, but there is one thing that it's still not clear to me.
The gamma encoding of the image is also included in the process you describe, or is it performed after that?
I will show an example to explain myself clearly...

Let's look again at the BT.709 inverse transfer function I posted previously:
Code:
R = R'/4.5                        if R' < 0.081248
R = ((R'+0.099)/1.099)^(1/0.45)   otherwise
Now imagine that we have a Blu-ray movie and, when we watch it, we want to process the image in linear light. For that, we have to use the function above to convert the gamma encoded image to linear light.
Now, the threshold above (0.081) correspond to which RGB value?
In 8bit RGB, with black at 0 and white at 255, it will be located between values 20 and 21, so all values < 21 will use the linear portion of the function, and all other values will use the non-linear portion; but, if we consider black at 16 and white at 235, the threshold would not be that anymore... Even worse, from what you described, there is the possibility that the threshold could not always be the same even in different parts of the same movie.
If the process you have described is a first step before the gamma encoding, and then the image is gamma encoded using the BT.709 transfer function, It would be all OK, because we could always revert it to linear light using the formula above, but if it's not, we would never be able to get the correct linear light values for all image, because we will not know where the threshold is...
Am I missing something here?
yesgrey3 is offline  
post #198 of 212 Old 11-02-2009, 12:24 PM
AVS Special Member
 
Mr.D's Avatar
 
Join Date: Dec 2001
Location: UK
Posts: 3,307
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 15
Quote:
Originally Posted by yesgrey3 View Post

Am I missing something here?

Nope sounds perfectly correct to me. this is one of those points when doing things solely by the numbers starts to break down because of how the imagery is created in the real world.

I think what you are maybe cooking up is that if the scan was linear and then run through a transfer curve to get it into log and or run into a rec.709 transfer curve you could completely linearise it with the reverse transform? You can actually do this assuming you know how the scanner was setup ( many places have their own custom transfer curves that relate solely to their own equipment).

Otherwise the best you can do is assume you will be close enough.

Assume that the rec.709 transfer curve is a valid wrapper for the format and use that as a standard to linearise with. This won't follow through back to the film scan though because its been through a couple of stages that will skew the result. Some real world some because its been yanked around by someone. Unless you can completely undo all of the color correction stages ( and many of them won't be reversible) you won't be able to actually get back to totally linear data.

You will still get a better result ( for some things) by making the assumption that you can linearise sufficiently : the image on its own terms.

Within the standards themselves imagery only has to look pleasing ( hopefully). There is no real notional "correct" look only some that are pleasing some that aren't.

Look at the log plate and how I graded it compared with the old cineon specs to convert to video in the 8bit enough for video thread. Unless you've got my curve you can't notionally work it back to the log ( I didn't clip though and I also didn't rebalance D54 to D65). The log plate itself will have been densitometered prior to scanning. From experience you can get the same material scanned on the same scanner and the two scans will not be exactly the same because of variances in how it was densitometered as well as engineering tolerances on the scanner..

Its really just like any other engineering tolerance: as soon as the real world comes into play you are no longer working with absolutes just a range of tolerances that you are either within or outside. Two bolts from different factories won't be precisely identical but hopefully they are built to similar tolerances so your wings won't fall off.

digital film janitor
Mr.D is offline  
post #199 of 212 Old 11-02-2009, 12:38 PM
AVS Special Member
 
Mr.D's Avatar
 
Join Date: Dec 2001
Location: UK
Posts: 3,307
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 15
Quote:
Originally Posted by yesgrey3 View Post

I understand the process, but there is one thing that it's still not clear to me.

The gamma encoding of the image is also included in the process you describe, or is it performed after that?


:

Yes its included. I don't dial in numbers to convert the gamma ( I do sometimes , depends on what is required) I just grade the log image on a rec.709 display. I'm not actually a million miles away from the cineon spec conversion but I prefer to keep the white detail).

Conversely when they DI they usually have a rec.709 environment that is lutted to a print film standard ( very accurately including gamut). When they finish grading the DI they apply the inverse of the film
correctional LUT to the material which essentially converts the graded film imagery to rec.709. This usually doesn't work for every single shot though.

So you can see how the standards at each end are constant and preserved but within that framework the material is color corrected to whatever is wanted.

Look on the bright side : its a lot more consistent than it used to be!

digital film janitor
Mr.D is offline  
post #200 of 212 Old 11-02-2009, 01:48 PM - Thread Starter
AVS Special Member
 
sspears's Avatar
 
Join Date: Feb 1999
Location: Sammamish, WA, USA
Posts: 5,252
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 19 Post(s)
Liked: 54
Quote:


I just grade the log image on a rec.709 display.

One thing to point out is that 709 does not define the display gamma. This is something that sRGB does do.

Charles Poynton is trying to get a get everyone to agree on a display gamma. He is currently proposing 2.35 as the standard.
sspears is offline  
post #201 of 212 Old 11-02-2009, 02:13 PM
AVS Special Member
 
Mr.D's Avatar
 
Join Date: Dec 2001
Location: UK
Posts: 3,307
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 15
Quote:
Originally Posted by sspears View Post

One thing to point out is that 709 does not define the display gamma. This is something that sRGB does do.

Charles Poynton is trying to get a get everyone to agree on a display gamma. He is currently proposing 2.35 as the standard.

I bang it around between 2.2 and 2.5 for checking robustness. I actually prefer towards the higher point for recreational viewing : depending on display.

Actually it would be easier just to stick with 2.2 rigidly as its the oft quoted standard video display gamma. I guess you have to factor in older material though.

In terms of linearising the "proper" way is to throw the inverse of the rec.709 transfer curve at it. The notional display gamma shouldn't come into it. Maybe linearising with a simple gamma should be termed "flattening" instead of "linearising".

digital film janitor
Mr.D is offline  
post #202 of 212 Old 06-07-2010, 05:31 PM
Member
 
yesgrey's Avatar
 
Join Date: Apr 2010
Posts: 44
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
Originally Posted by Mr.D View Post

Assume that the rec.709 transfer curve is a valid wrapper for the format and use that as a standard to linearise with.

Quote:
Originally Posted by Mr.D View Post

In terms of linearising the "proper" way is to throw the inverse of the rec.709 transfer curve at it. The notional display gamma shouldn't come into it. Maybe linearising with a simple gamma should be termed "flattening" instead of "linearising".

Mr.D,
I'm resurrecting this thread because I still have one doubt about this...

I've understood that for linearizing it's preferable to use the inverse of rec.709 transfer function, even though we could never recover the original linear data. However, I'm still missing one thing, and I would like to know if you could help me out with it...

Considering that generally the video is being mastered with black at 16 and white at 235, apparently without any valid data bellow and above that, which values should I use as 0.0 and 1.0 with the inverse of rec.709 transfer function?

If I use 16 as 0.0 and 235 as 1.0, values bellow 16 will be negative and values above 235 will be > 1.0. If I use 0 as 0.0 and 255 as 1.0, all values will be within the 0.0-1.0 range. This is not a problem, but I would like to know which of them should be preferable. Do you have any idea about that?
yesgrey is offline  
post #203 of 212 Old 06-08-2010, 02:23 AM
AVS Special Member
 
Mr.D's Avatar
 
Join Date: Dec 2001
Location: UK
Posts: 3,307
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 15
Quote:
Originally Posted by yesgrey View Post

Mr.D,

If I use 16 as 0.0 and 235 as 1.0, values bellow 16 will be negative and values above 235 will be > 1.0. If I use 0 as 0.0 and 255 as 1.0, all values will be within the 0.0-1.0 range. This is not a problem, but I would like to know which of them should be preferable. Do you have any idea about that?


More often than not its 16-235 in terms of the calculation. However its usually done in float so you preserve the full 0-255 range intact and it flows through back to integer when you "re-gamma". Things like this are very important in post production: transparency.

As to not doing it in float then your only real recourse is to use the maximal data range. The slight difference you will get in terms of pixel interpolation as a result will be tiny (unless you can recalculate the transfer curve accordingly although I think you will end up with a non-reversible transform.

I've said before with video you will likely get 99% of the benefits of linear processing if you use a simple gamma rather than the transfer curve especially with something like scaling and you have the easy reversibility of a simple gamma.

I would recommend preserving the full range at the cost of pixel value perfection for the linearistation stage.

Its important however that you have transparency with your linearisation. You should be able to pop it into linear and back out again with no net difference to the original.

I do often come across film imagery that has a tell tale 10 code value (10 bit log) error indicative of sloppy log/lin/log conversion. With some kit you will get a cumulative rounding error if you employ too many seperate linearisation stages. The good news is that it doesn't get any worse after a certain point.

I never visually reference things in linear . I just do the processing steps I need in linear and then pop back out referencing in the target colorspace. Some people and companies have a solely linear pipeline with film and video being linearised prior to handing to the artists. More and more I come across artists who just do not have a clue when it comes to colorspace as a result. You could argue that its one less thing for the artists to mess up.

Float solves a lot of problems but its a question of whether you want to carry around that amount of data for minimal net improvement.

digital film janitor
Mr.D is offline  
post #204 of 212 Old 06-08-2010, 02:44 AM
AVS Special Member
 
JohnAd's Avatar
 
Join Date: Jun 2000
Location: London
Posts: 1,725
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 16
Quote:
Originally Posted by yesgrey View Post

If I use 16 as 0.0 and 235 as 1.0, values bellow 16 will be negative and values above 235 will be > 1.0.

This is the correct approach, otherwise the linear section is in the wrong place. One of the advantages of having a linear section is that it is simple to extend the linear section back into the negative space below signal 16 and then the transform can be done cleanly back and forth. With the straight power functions it's not clear what to do with negative numbers but whatever you do you should ensure that if you start with say a 12 signal then after you invert and then reapply you end up with 12 again and don't clip everything to 16. (At the very least this will ensure that test patterns work properly). At the top end there is less problem mathematically with either approach and again you just need to ensure that you get back what comes in.

John

My Company - Upsilon Software
Free Projects - DScaler & hcfr fork
JohnAd is offline  
post #205 of 212 Old 06-08-2010, 02:51 AM
AVS Special Member
 
madshi's Avatar
 
Join Date: May 2005
Posts: 5,482
Mentioned: 9 Post(s)
Tagged: 0 Thread(s)
Quoted: 70 Post(s)
Liked: 140
@Mr.D,

yesgrey's application is an offline-calculation app which aims at creating a "perfect" monstruous 3D lut. For this purpose he already does all his calculations in 64bit float, anyway. So he'll definitely be using float. The only question is:

(1) Does the Rec709 transfer function expect video black to be at 0.0? In this case BTB would be negative numbers. Which should not be a problem. In this case the linear segment of the transfer function would be in the lower IREs of the visible range.

(2) Does the Rec709 transfer function expect video black to be at 16.0/255.0? In this case the linear segment of the transfer function would be burried in the BTB area. Which somehow doesn't make much sense to me, personally. Why using a linear segment, if it's burried in BTB?

You have a good point about reversibility, though. IMHO the junction point of the linear and power segments of the transfer function is not properly defined. I mean if you feed the border value (at which the segments meet) into the linear and into the power functions, you don't get the same result. Which means that this 2-part transfer function is not propery reversible. @yesgrey, maybe that's one of the causes for the problems you currently have? I think the transfer function needs to be adjusted so that the linear and power segments properly merge into each other. That way reversibility would be restored, I think.

Edit: I wrote this before reading JohnAd's comment.
madshi is offline  
post #206 of 212 Old 06-08-2010, 03:05 AM
AVS Special Member
 
JohnAd's Avatar
 
Join Date: Jun 2000
Location: London
Posts: 1,725
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 16
Quote:
Originally Posted by madshi View Post

IMHO the junction point of the linear and power segments of the transfer function is not properly defined. I mean if you feed the border value (at which the segments meet) into the linear and into the power functions, you don't get the same result.

You have to make it a continuous function by using the unrounded values see "Theory of the transformation" in
http://en.wikipedia.org/wiki/SRGB

I start with gamma and K0 and solve for phi and alpha so that the discontinuity is removed.

John

My Company - Upsilon Software
Free Projects - DScaler & hcfr fork
JohnAd is offline  
post #207 of 212 Old 06-08-2010, 03:20 AM
AVS Special Member
 
madshi's Avatar
 
Join Date: May 2005
Posts: 5,482
Mentioned: 9 Post(s)
Tagged: 0 Thread(s)
Quoted: 70 Post(s)
Liked: 140
Quote:
Originally Posted by JohnAd View Post

You have to make it a continuous function by using the unrounded values see "Theory of the transformation" in
http://en.wikipedia.org/wiki/SRGB

I start with gamma and K0 and solve for phi and alpha so that the discontinuity is removed.

Ah - thanks! Not sure, maybe yesgrey is already doing that. It's not really my area of expertize...
madshi is offline  
post #208 of 212 Old 06-08-2010, 05:33 AM
Member
 
yesgrey's Avatar
 
Join Date: Apr 2010
Posts: 44
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
Originally Posted by Mr.D View Post

More often than not its 16-235 in terms of the calculation. However its usually done in float so you preserve the full 0-255 range intact and it flows through back to integer when you "re-gamma".

Quote:
Originally Posted by JohnAd View Post

This is the correct approach, otherwise the linear section is in the wrong place.

Thanks. This was one of the things I was still missing. I was already trying this approach, but wasn't sure if it was the correct one...

Quote:
Originally Posted by madshi View Post

I think the transfer function needs to be adjusted so that the linear and power segments properly merge into each other. That way reversibility would be restored, I think.

Quote:
Originally Posted by JohnAd View Post

You have to make it a continuous function by using the unrounded values see "Theory of the transformation"

It's funny, I already have added this as an option in my program, but now I realize it shouldn't be an option, it should be a must.

Only recently I've realized that all the values used in the formulas indicated in the standards are only rounded values, so we should not take them exactly as our reference...

Thank you all for the help.
yesgrey is offline  
post #209 of 212 Old 06-08-2010, 04:37 PM
Member
 
yesgrey's Avatar
 
Join Date: Apr 2010
Posts: 44
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
Originally Posted by JohnAd View Post

I start with gamma and K0 and solve for phi and alpha so that the discontinuity is removed.

Any special reason?
Why not starting with gamma and alpha and calculate k0 and phi like in the article? Doing this only the linear segment will change, while with your way both linear segment and the power curve are affected, but the transition point is kept.
yesgrey is offline  
post #210 of 212 Old 06-09-2010, 01:29 AM
AVS Special Member
 
JohnAd's Avatar
 
Join Date: Jun 2000
Location: London
Posts: 1,725
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 16
Quote:
Originally Posted by yesgrey View Post

Any special reason?

not sure I can remember exactly why I made that choice, as you point out I probably felt that the exponent and transition point where more important than the other varaibles, certainlt amny differences will not lead to measurable differences in output, the important thing is that it's continuous and as smooth as possible which either approach gives.

John

My Company - Upsilon Software
Free Projects - DScaler & hcfr fork
JohnAd is offline  
Reply HDTV Software Media Discussion

Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page


Forum Jump: 

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off