Differences between 16-bit and 32-bit color settings in HFP2017?

Vespill Posts: 57
edited November 2016 in General

What is the difference between 16 bit and 32 bit color float settings in HFP2017 ? 


  • NormanPCN
    NormanPCN Posts: 4,377 Expert
    edited November 2016

    32-bit float will take twice the ram as 16 which takes twice the ram as 8-bit.

    With respect to image processing both 16 and 32-bit will have similar overall range for values but the 32-bit float will have greater precision. A 23-bit mantissa for 32-bit float verses a 10-bit mantissa for 16-bit float. The 16-bit float has enough precision to handle the 10-bit output from Pro cameras. If one has such a camera and is concerned about that.

    For the most part just stick with 8-bit. It is faster and works correctly with the vast majority of all situations. Layers fine wispy feathers/alpha, are a common situation where 8-bit might band and 16-bit can help. When it is a problem you will/should see it. 

  • Triem23
    Triem23 Posts: 20,297 Power User
    edited November 2016

    A slightly oversimplified answer.

    Right, in this case we're talking "bits per channel."

    Remember, a bit is either 0 or 1, Yes or No, On or Off, DO or DO NOT. A bit cannot have a fractional value, a remainder, a middle state, and it can not try.

    8 bits is a byte. 1024 bytes is a kilobyte, 1024 kb is a Megabyte, and so on.

    In Hitfilm a video image has four basic channels you're usually dealing with: Red, Green, Blue and Alpha. There are other types of channels, but a channel is a single value that is defined by the number of bits it has.

    For simplicity, we're going to use a single channel called "Luminance," Luma can be thought of a black (0) to white (max)

    8 bits per channel gives a value range of 0-255. (And in RGB, that's actually enough to more-or-less define all visible colors). 16 bits/channel has a value range of 0-65535, while 32bcc has  values of 0 to over two BILLION.

    Most media you deal with--mp4, jpg, png, will be 8bcc. Certain video codecs might be 10bcc (0-1023) or 12bcc (0-4095).

    Your monitor displays 8-bit color. If you are rendering an mp4 from Hitfilm, you are rendering 8-bit color. 16 and 32bcc is using extra numbers before displaying an 8-bit image.

    Now, remember, a bit can't have a fraction or a remainder. If you perform a mathematical operation on a binary number a fraction or remainder is automatically dropped. Not rounded, but dropped. Effectively all fractions round down.

    Everything you do in Hitfilm ultimately results in a mathematical calculation that will change the values of the channels of each pixel.

    So let's simplify more. We're going to pretend that 8 bits gives a value of 0-10 and that 16 bits is 0-100. (This isn't even close to the actual ratio, but it will get the point across.)

    Ok, I have an "8-bit" grey image with four squares, values of 6, 7, 8, 9. I am working in "8-bcc" color. I set this layer to 33% opacity. Normally this would be 2, 2.3, 2.6 and 3. However, THERE ARE NO FRACTIONS. So what happens is I get 2,2,2,3. That is what is drawn on the screen

    Ok, let's do that in a "16-bit" colorspace. My 6, 7, 8 and 9 become 60, 70, 80 and 90. at 33% opacity that becomes 20, 23, 26, 30. Now we have to convert back to "8-bit" to draw this on screen. However, because we're converting a higher bit number to a lower bit number, this time we can properly round fractions. So what gets drawn is 2,2,3,3.

    • 6,7,8,9      Original values
    • 2,2,2,3      33% transparency in 8bcc color space
    • 2,2,3,3      33% transparency in 16bcc color space

    So, basically the 16-bit math lets the 8-bit number fake it's fractions until final display, which gives more accurate results.

    So, lesson here is that if you are working with 8-bit source images, 16 bit color is probably good enough.

    32 bit color is really insane precision, and is a bit of overkill unless you're starting with 14 to 16bcc images like Open EXR. Same basic principle, bigger numbers. 32bcc lets the 16-bit image "fake" fractions when doing the math.

    @NormanPCN I respectfully disagree and recommend 16-bit as a normal working mode. The "rounding" errors really add up once we're actually using all our channels and lots of layers and blending modes and glows, etc.

  • IamJoshuaDavies
    IamJoshuaDavies Posts: 363 Staff
    edited November 2016

    I'm somewhere in the middle here... agreeing with both @NormanPCN @Triem23.  

    If I'm just doing an edit (with next to no grade) I would stick with 8-bit in most cases - it is going to be fast and we all like the speed.

    If I'm doing heavy compositing and grading I would up that to 16-bit..

    I'm working on an edit which I then decide I want to grade heavily I can easily switch between 8-bit and 16-bit in HitFilm so I guess I would say... work in 8-bit until it becomes an issue (if it ever does) then up to 16-bit - the extra speed of 8-bit might really help to begin with.

  • CedricBonnier
    CedricBonnier Posts: 1,236 Staff

    @Triem23 just for correctness' sake, @NormanPCN is right, you are assuming 16 bit and 32 bit integer in your calculations, whereas they are floating point precisions. You can encode numbers much higher than 2 Billion in a 32 bit floating point number. Usually the bigger the number is, the less precision it can have for the decimal part.

    Color data in HitFilm is saved between 0 and 1 when using floating point and changing between 16 and 32 bit will give you more precision. 8 bit color in HitFilm is saved as an integer, which indeed gives you a range of 0-255, so 256 possible values per channel.

    As to the question of when to use which version, I think everyone got their preference. In my opinion it is a tradeoff for speed against quality, a bit like the video bitrate when you export a video. If 8 bit is looking good to you then use this, otherwise bump the setting to 16 or 32...

  • Thank you all for the very helpful explanations. 

  • NormanPCN
    NormanPCN Posts: 4,377 Expert

    Just to add to the confusion. When Photoshop is doing 16-bit images it is signed 16-bit integer (+-15-bit). The same is true of After Effects. 16 bpc is signed integer.

    When apps go 32 bpc is is always float in all image apps, AFAIK.

  • Aladdin4d
    Aladdin4d Posts: 2,466 Enthusiast

    @NormanPCN ImageMagick is always integer up to the Q level unless it was compiled with the HDRI option so Q16 is 16 bit integer and Q32 is 32 bit integer but just to make things even more confusing Q16 HDRI is actually 32 bit float and Q32 HDRI build is, I think, 96 bit float. 

  • Triem23
    Triem23 Posts: 20,297 Power User

    @CedricBonnier thanks for the correction and technically correct answer. I did say I was oversimplifying, but, yes, you gave better information, although my analogy ain't bad. 

  • 3dslider
    3dslider Posts: 21 Enthusiast

    Cool information here, @Triem23 I was thinking 32 bit as 8bit alpha + 24 bit true color, right ? It mean 4,294,967,296 color combinations. Howerver 16 bit i don't see what advantage than 32 bit cause it support gradients, shadows, and transparencies.

  • NormanPCN
    NormanPCN Posts: 4,377 Expert
    edited November 2016

    Color depth information is most commonly quoted as the number of bits per channel. There are always 3 channels. RGB or YUV (YCrCb to be anal). So 8 bpc (bits per channel) is 24-bit total which gives 16 million colors. Something might have Alpha, and the Alpha channel is usually the same size as the color channels, but Alpha has nothing to do with color and only talks about transparency of the pixel.

    Apps also list color with all channels combined. It is not terribly consistent. Hitfilm on the project properties page lists color bit depth and that is a per channel specification. In Hitfilm on the media properties page it lists color in a combined spec, 24-bit for 8-bit channels and no Alpha. If the media file has Alpha, and nearly all do not, then 8-bit channels would list 32-bit in Hitfilm.

    Then you have an app like Vegas which lists media file color info by taking into account the chroma subsampling. This is a very technical nerdy thing. So a GoPro AVC 4:2:0 file is listed as 12-bit in Vegas and 24-bit in Hitfilm. The way Hitfilm lists it is the best way IMO.

    One thing consistent is that both Vegas and Hitfilm and I expect most apps list their operating color depth mode in a per channel spec. i.e. 8-bit. When they list media file specs it can become inconsistent across apps.

    The unfortunate thing about the inconsistency is what if someone who knows nothing about color depth and wonders what they should use in Hitfilm project settings. They look at their media file in Hitfilm and it lists 24-bit. They might think, I should use 32-bit color in Hitfilm project settings otherwise I am losing something. That is wrong and unfortunate.

  • CedricBonnier
    CedricBonnier Posts: 1,236 Staff

    @NormanPCN good point, maybe we should try to make this a bit clearer and easier to understand in the project screen.

  • I am not that knowledgable in bit depth. But, if I worked in 8-bit and rendered at 16 or 32bit, would there be a noticeable improvement in quality? Or do I have to have 16 and 32 bit media within the project to achieve higher quality renders?

  • Stargazer54
    Stargazer54 Posts: 3,899 Ambassador

    Bit depth refers to the number of colors that can be displayed in an image.  Also the higher the number, the more data and the larger the file (generally speaking).

    8 bit -256 colors

    16 bit - 65,536 colors

    24 bit - 16,77,216 colors

    32 bit - 16,77,216 colors, the extra 8 bits are used for the Alpha channel (transparency)

    Typically you want to work in 24 bit.  No need for 32 unless you are going to use transparency.   So if you have a nice 24 bit image in Photoshop or render at 24 bit, you are good to go.

    But if you take your PS image and use the lasso tool to cut out portions of the picture and then save that out as a 32 bit image and bring that into HF over a background layer, then the "cut outs" will be transparent and you will see the background through them.

  • NormanPCN
    NormanPCN Posts: 4,377 Expert

    Hitfilm's 8-bit mode is 8-bits per channel. aka 24-bit RGB. 32-bit when you consider alpha.

  • Triem23
    Triem23 Posts: 20,297 Power User

    @toddgroves make sure you read the first five responses in this thread. I ain't retyping what I've already written, and those first few posts really cover what you want to know.