Grass Valley Forums Facebook   Twitter   YouTube  

Go Back   Grass Valley Forums > Converters > ProCoder

Reply
 
Thread Tools Display Modes
Old 05-14-2008, 09:34 AM   #1
lalittle
Member
 
Join Date: May 2007
Location: Los Angeles
Posts: 56
Default Why is PC3 automatically converting 16-235 range to 0-255?

I noticed that when encoding a QTRef file in PC3 (from Avid Xpress Pro, working in DV25), PC3 is automatically converting the luminance range from 16-235 to 0-255. The QTRef file is definitely using 16 to 235, but when I encode the file in PC3 to some type of quicktime file, the encoded file has been converted to the full 0 to 255 range.

It does this WITHOUT using any filters, which is how I actually noticed this happening -- i.e. I assumed I'd need the "expand" filter to convert the range when making the QT file, but when I did this, I ended up clipping the blacks. By using a test file to investigate what was happening, I discovered that black areas at 16 in the original file were now at 0 in the encoded output.

At this particular moment, there isn't actually a "problem" with this since the result is what I want (i.e. I WANT the conversion from 16-235 to 0-255), but I'd like to understand why this is happening, and I want to know why I don't have to use a filter to get this result (which seems like what I "should" have had to do.) Is PC3 set to automatically expand QTRef files that come from DV sources? My concern is that at some point, I may end up in a situation where I DON'T want PC3 to automatically convert the luminance range, and at this time, it does not appear that this is possible with PC3.

Thanks for any feedback on this,

Larry
lalittle is offline   Reply With Quote
Old 05-15-2008, 12:01 AM   #2
GrassValley_BH
Demystifier/Analogizer
 
Join Date: Apr 2007
Location: Hillsboro, OR
Posts: 5,785
Default

Unless it has changed, normal RGB->YUV conversion assumes 16-235 RGB to full-range YUV.

Wait, no, that seems wrong... Hmmm. What source/target formats are these again?
GrassValley_BH is offline   Reply With Quote
Old 05-16-2008, 10:42 AM   #3
lalittle
Member
 
Join Date: May 2007
Location: Los Angeles
Posts: 56
Default

Quote:
Originally Posted by GrassValley_BH View Post
Unless it has changed, normal RGB->YUV conversion assumes 16-235 RGB to full-range YUV.

Wait, no, that seems wrong... Hmmm. What source/target formats are these again?
The source is a QTRef file created in Avid Xpress Pro that references DV25 files. The target is a Quicktime mov file (H.264 codec using the "Quicktime Export File" target option, which uses QT Pro as an external encoder from within PC3.) I would have "thought" that I would need to use the "expand" filter to convert the 16-235 source to 0-255 for the QT file, but this is happening automatically without requiring ANY filters.

Thanks for the feedback on this -- I just want to understand why it's working the way it is.

Larry
lalittle is offline   Reply With Quote
Old 05-16-2008, 09:05 PM   #4
GrassValley_BH
Demystifier/Analogizer
 
Join Date: Apr 2007
Location: Hillsboro, OR
Posts: 5,785
Default

This may or may not relate to how QuickTime "intelligently" determines gamma on decode...

But, since the source is DV25, it should just pass straight-through as the DV25 decode should be YUV.

So here the question is what happens on the YUV->RGB conversion. If the original DV is full-range YUV, then the result should end up being full-range RGB.

If either is clamped (or needs to be clamped) then the filters get involved, but otherwise the expand/shrink filters should not be needed.
GrassValley_BH is offline   Reply With Quote
Old 05-16-2008, 09:29 PM   #5
lalittle
Member
 
Join Date: May 2007
Location: Los Angeles
Posts: 56
Default

I'm a little confused -- why would the color space (i.e. RGB or YUV) effect how the luminance range (i.e. 16-235 or 0-255) is treated during the conversion? Changing one does not necessitate changing the other, so why is this the determining factor in whether or not the luminance range is converted automatically?

Is the bottom line that the overall "system" IS trying to be smart about the way it's converting the data? All I know is that in the past, with other encoders, I've always had to expand the luminance range with filters when making QT files from my QTRef files. With PC3, however, I suddenly don't have to do this because it's happening automatically. So... is PC3 being "smart" about this, or is QT pro, or...?

Thanks again,

Larry
lalittle is offline   Reply With Quote
Old 05-16-2008, 11:17 PM   #6
GrassValley_BH
Demystifier/Analogizer
 
Join Date: Apr 2007
Location: Hillsboro, OR
Posts: 5,785
Default

YUV<->RGB conversions can affect the luminance range because one "standard" for RGB<->YUV conversion says YUV 16-235 maps to RGB 0-255, while another "standard" says YUV 0-255 maps to RGB 0-255 (or YUV 16-235 maps to RGB 16-235, roughly).

ProCoder and EDIUS use the latter, where the full range is preserved in conversion.

That said, in this case I'm not sure whether ProCoder's passing YUV or RGB data to the QuickTime Export File (in the latest version this is now called QuickTime plugins) since I'm not sure whether it "knows" what colorspace QuickTime's exporter uses. It might, but my gut feeling is that it's just passing the data as-is, so YUV in this case, and QuickTime is auto-expanding the range (probably because it assumes YUV 16-235 maps to RGB 0-255).
GrassValley_BH is offline   Reply With Quote
Old 05-17-2008, 10:46 PM   #7
lalittle
Member
 
Join Date: May 2007
Location: Los Angeles
Posts: 56
Default

Whichever way it's working, it makes sense now.

Thanks for the explanation.

Larry
lalittle is offline   Reply With Quote
Reply
 
Go Back   Grass Valley Forums > Converters > ProCoder
 

Bookmarks

Thread Tools
Display Modes

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 Off
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:54 AM.


Copyright 2014 Belden Inc. All rights reserved.