All posts
By Pravit Gandhi··23 min read

How log formats allocate 10-bit code values

Nine log curves computed from the manufacturers' own published formulas and put on one scale: where middle grey lands, and how the code values split.

Fujifilm F-Log spends 375 of its 1023 code values between black and middle grey. Sony S-Log3 spends 325, and V-Log, F-Log2 and ARRI LogC3 at EI 800 all spend 305. Every major log format publishes the equation those numbers come from, and almost nobody puts the equations on the same scale, so arguments about which format "protects shadows" or "holds highlights" run on impressions. I took the published formula for nine formats, validated each implementation against that manufacturer's own published anchor points, then computed where 18 percent grey and 90 percent white land, a stop ladder from -6 to +6, and how many 10-bit code values each curve spends below and above middle grey.

This compares encodings, not cameras. It says nothing about sensor noise, dynamic range or image quality. A curve that assigns more code values to shadows is not thereby cleaner in shadows, because noise comes from the sensor and the exposure, not from the curve.

Every figure below is also available interactively in our log reference tool, which computes them live from the same formulas for any format and any exposure between minus eight and plus eight stops.

What this can and cannot tell you

Code value allocation sets how finely a signal is quantised after the sensor has already produced it. It cannot add information the sensor did not capture. If two cameras have different noise floors, the curve applied on top is not what separates them, and no amount of arithmetic on the transfer function will tell you which one holds up better at 3200.

Three more limits worth having in front of you before the numbers.

The 10-bit full range scale is a common ruler, not a claim about any recording format. Several of these curves encode RAW data that is never quantised to 10 bits, and others are recorded at 12 bits. Sony, Panasonic, Canon and ARRI each state the full range convention for their own curve, and Fujifilm's data sheets pin it arithmetically without using the words — its formula returns 0.092864 at zero reflection and its table prints code 95, and 0.092864 x 1023 is 95.00, where a legal-range mapping would give 145. So the ruler is theirs, but putting them side by side is my construction rather than anyone's specification.

The "top of curve" figures are where the encoding function reaches full scale, which is a property of the equation. Where a given camera clips is a separate, sensor-dependent number that most manufacturers do not publish.

And the ladders assume an ideal 0.18 grey card and a 0.90 white card. Real scenes are not calibrated targets, and the two curves that treat middle grey differently are flagged where it matters below.

The numbers

All values are 10-bit full range code values, 0 to 1023. "Code values per stop" is the slope in the straight-line part of each curve. "Below" is the gap between zero light and middle grey; "above" is from middle grey to full scale.

FormatBlack18% grey90% whiteCode values per stopBelow greyAbove greyShare belowTop of curve
Sony S-Log39542059878.732560335.0%+7.74 stops
Panasonic V-Log12843360274.430559034.1%+8.00 stops
Canon Log 3128351577113.122367224.9%+6.35 stops
ARRI LogC3 (EI 800)9540057276.130562332.9%+8.26 stops
ARRI LogC49528542866.319073820.5%+11.35 stops
RED Log3G109434149469.124768226.6%+10.00 stops
Nikon N-Log127372603104.024565127.3%+6.36 stops
Fujifilm F-Log95470705106.137555340.4%+5.34 stops
Fujifilm F-Log29540057075.530562332.9%+8.34 stops

The stop ladder, relative to 18 percent grey at 0:

Format-6-5-4-3-2-10+1+2+3+4+5+6
Sony S-Log3114133171219279347420496573651729808886
Panasonic V-Log144160192240298364433505578652726800874
Canon Log 3134141153177216275351443544650760872984
ARRI LogC3 (EI 800)110126157204263329400473548623699775851
ARRI LogC4104112127150185231285344407471537603669
RED Log3G10109123146180225280341406473541609678747
Nikon N-Log141153173202243299372466570674778882986
Fujifilm F-Log1181391732242933764705696727768829871093*
Fujifilm F-Log2119138169212267331400472546621696771846

*F-Log is the only format here whose ladder runs off the end of its own curve. It reaches code 1023 at +5.34 stops, so its +6 rung is the formula continued past full scale rather than a code the format can write. Its real budget above middle grey is the 553 in the table above, not 623. Everything else in both tables stays inside its curve's domain.

The "share below" column in the first table has a confound baked into it: a curve that covers more total stops must spend fewer code values on each one, so its shadow share falls for reasons that have nothing to do with shadow priority. Measuring every format over the same twelve-stop window removes that:

Format-6 to 00 to +6Shadow to highlight
Sony S-Log33064660.656
Panasonic V-Log2894410.655
ARRI LogC3 (EI 800)2904510.642
Fujifilm F-Log22814460.630
RED Log3G102324060.571
Fujifilm F-Log351623*0.564*
ARRI LogC41813840.471
Nikon N-Log2316140.376
Canon Log 32176320.343

*Same caveat as the ladder: F-Log's 0-to-+6 figure runs past where its curve reaches full scale, so its window total and ratio are the formula extrapolated rather than encodable range. Its shadow half, 351, is real and is the largest of the nine.

Highlight headroom, ranked

The "top of curve" column from the first table, ordered and to three decimals. This is stops above middle grey to code value 1023, where each equation reaches full scale, computed identically for all nine.

FormatStops above middle grey to code 1023
ARRI LogC411.350
RED Log3G1010.000
Fujifilm F-Log28.338
ARRI LogC3 (EI 800)8.257
Panasonic V-Log8.000
Sony S-Log37.738
Nikon N-Log6.360
Canon Log 36.349
Fujifilm F-Log5.338

Log3G10's 10.000 is the calibration point for the whole column, and it is the best evidence in this article that the column measures what manufacturers measure. RED publishes that figure itself — Log3G10 reaches 1.0 at ten stops above middle grey — and the method used here reproduces it exactly rather than being fitted to it. Every other row is the same arithmetic applied to a different equation, so the column is worth about as much as that one check.

Which is why it is worth saying plainly that the usual answer to this is wrong. Ask which log format holds the most highlight range and you will be told Log3G10, for the ordinary reason that it is the only one of the nine with a published figure to find. LogC4 beats it by 1.35 stops. Nobody published that, and it is not a hard number to get; it falls out of putting the equations on one scale.

F-Log is last on this column and first on shadow allocation, which is one fact seen from both ends. Its 375 code values below middle grey, the most of the nine, are affordable because it has only 5.338 stops to cover above grey, the fewest of the nine. The two tables have to be read together, or F-Log looks like a shadow-priority curve instead of a short-range one.

Two smaller findings fall out of computing the column, and both are the kind of thing only arithmetic surfaces.

S-Log3's toe branch sits at exactly minus four stops. Sony's formula leaves its logarithmic branch for a linear toe at reflectance 0.01125, and 0.18 divided by 16 is 0.01125 exactly — four stops under an 18 percent grey card, to the last digit. That is a choice rather than a coincidence, which is easiest to see against the others: V-Log switches at -4.170 stops, LogC3 at EI 800 at -4.087, and both Fujifilm curves far lower, at -7.660 and -7.662.

F-Log2 and LogC3 at EI 800 both put middle grey on code 400, and not approximately. Reading one as the other costs 0.0000058 stops at middle grey, the mildest of the 72 ordered pairs in the nine-format matrix by more than four orders of magnitude. They are still not the same curve. They cross at middle grey and separate in both directions: F-Log2 sits 12.0 code values above LogC3 at -5 stops and 4.1 below it at +5. A grey card cannot tell them apart, and nothing else in the frame agrees with the grey card.

How to check this yourself

The method is deliberately dull, and the validation step is the part that matters.

Take the manufacturer's published formula. Transcribe it exactly, including the piecewise conditions and every constant. Then, before computing anything else, run it against the anchor points that same manufacturer publishes. If your implementation reproduces their numbers, it is right. If it does not, you have the formula or the range convention wrong.

Here is what that looked like across all nine, computed against published values:

FormatPublished anchorComputed
Sony S-Log30% black 95, 18% grey 420, 90% white 59895.0, 420.0, 597.9
Panasonic V-Log0% 128, 18% 433, 90% 602127.9, 433.0, 601.7
Canon Log 30% black code 128; max DR 1600%128.0; 1630%
ARRI LogC318% grey = 0.391 = 400/1023; black 0.09280.3910 = 400.0; 0.0928
ARRI LogC4linear 0.18 = 0.2784; 1.0 = 469.80 linear; top +11.35 stops0.2784; 469.80; +11.35
RED Log3G100.18 = 0.333333; 184.322 = 1.0000000.333333; 1.000000
Nikon N-Logbranch switch at code 452451.8
Fujifilm F-Log0% 95, 18% 470, 90% 705; IRE 3.5, 46, 7395.0, 469.9, 705.4; 3.5, 46.3, 73.2
Fujifilm F-Log20% 95, 18% 400, 90% 570; IRE 3.5, 38, 5895.0, 400.0, 569.9; 3.5, 38.4, 57.8

Fifty-one checks in total, all passing. Sony's table gives three code values and the implementation returns all three. ARRI states that 18 percent grey maps to "the Log C value of 0.391, which is 400/1023", and it does. ARRI also states that LogC3 spends 73 to 78 code values per stop in a 10-bit encoding. Two different measures of that both land inside the band: the slope at middle grey is 73.4, and the average across the working range is 76.1. RED's five-point mapping table reproduces to six decimal places, and its claim that Log3G10 reaches 1.0 at exactly ten stops above middle grey checks out at 10.000.

Fujifilm is the best-documented of the nine and, oddly, the one most often left out of comparisons like this. Both data sheets publish the constants, the formula in both directions, and a table giving code values and IRE at 0, 18 and 90 percent reflection. That second column is worth more than it looks: it lets you confirm the range convention independently of the code values, because five of the six IRE figures only work under the legal-range reading. Fujifilm's code 705 is 73.2 percent legal-range IRE against a printed 73, and 68.9 percent full-range. One curve covers three camera settings, too — the F-Log2 sheet states its gamma curve "is identical to that of F-Log2C", so F-Log2 C differs by gamut, not by curve.

Two of these needed real work, and they are the useful cautionary tales.

Canon labels its input axis "Scene Linear %", not reflectance, and Canon's percentage is normalised so 100 percent is a 90 percent white card. That puts an 18 percent grey card at 0.20, not 0.18. Assume reflectance and you get code 339 for middle grey instead of 351, an error you would never notice without checking. The evidence for the correct reading is Canon's own: their stated maximum dynamic range figures of 800, 1600 and 6400 percent are reproduced to within about four percent under this normalisation, computing as 830, 1630 and 6582. Their published comparison graph agrees too, which I measured programmatically after confirming the pixel scale against Canon's two stated black levels of 128 and 95. The residual four percent is the reason those particular checks carry a tolerance rather than being exact matches, and it is worth knowing that Canon's dynamic range headline is a rounded figure.

Nikon is the weak one, and I would rather say so than quietly average it in with the rest. Nikon publishes the N-Log formula in both directions but no table of code values, so there is no published anchor to hit. The checks available are that both branches meet at Nikon's documented switch point of code 452, and that a round trip through Nikon's own inverse is exact. That constrains the four constants, but it is not the same standard of proof as the other eight. Read the N-Log row with that attached.

What the numbers actually say

The formats colorists compare most often are, on allocation, close to the same curve. Sony S-Log3, Panasonic V-Log and ARRI LogC3 put middle grey within 33 code values of each other, differ by 4.3 code values per stop, and over a matched twelve-stop window return shadow-to-highlight ratios of 0.656, 0.655 and 0.642. Those are within 2 percent of one another. Whatever separates footage from these three cameras, it is not how their encoding curves distribute code values, and an argument about which of them "protects shadows" is an argument about roughly a quarter of a stop's worth of encoding.

Fujifilm F-Log2 belongs in that group, which is the first thing adding Fujifilm changed. It lands inside every one of those bounds rather than beside them: middle grey at 400, the same code as LogC3; 75.5 code values per stop, between V-Log's 74.4 and LogC3's 76.1; a shadow share of 32.9 percent, again the same as LogC3. Adding it does not widen the middle-grey spread, the slope spread or the shadow-share spread at all. Only the matched-window ratio moves, from a range of 0.642 to 0.656 out to 0.630 to 0.656, taking the cluster from within 2 percent of itself to within 4. If you have graded S-Log3 or V-Log, F-Log2 will behave the way you expect.

That the two agree so precisely has a sharp practical edge. F-Log2 and LogC3 at EI 800 both put an 18 percent grey card on code 400, so confusing one for the other is invisible on a grey card — and still costs about a third of a stop four stops down, where the toes part company. It is the mildest mis-tag in the nine-format matrix at middle grey and by some distance the easiest to miss.

The second thing adding Fujifilm changed is bigger, because it overturns something this article previously said. S-Log3 is not the format that allocates the most to shadows. F-Log is. F-Log puts 375 code values below middle grey against S-Log3's 325, and spends 40.4 percent of its own black-to-full-scale span down there against S-Log3's 35.0 percent. Both are the highest of the nine. The folklore that grew up around S-Log3 was measuring a real thing, but it was measuring it in a field that did not include Fujifilm — S-Log3 is the most shadow-weighted of the mainstream cluster, not of log formats generally. Either way the practical advice is unchanged and worth repeating: if you are chasing clean shadows the curve is not your lever, exposure is, which is why exposing S-Log3 correctly does more for a shadow-heavy scene than any choice made downstream, and why S-Log3 that looks washed out is nearly always a display transform problem rather than an encoding one.

Real differences do exist, and they run along three axes rather than one.

The first is total encoded range, and Fujifilm supplies both ends of it. LogC4 reaches full scale 11.35 stops above middle grey and Log3G10 at exactly 10.00, against 7.74 for S-Log3 and just 5.34 for F-Log, the shortest in the set. A curve covering more stops in the same container has to spend fewer code values per stop, and LogC4's 66.3 is the lowest here while F-Log's 106.1 is nearly the highest. LogC4's 20.5 percent share below middle grey is not a decision to neglect shadows, it is arithmetic following from the range it covers; F-Log's 40.4 percent is the same arithmetic running the other way.

Fujifilm's own two curves are the cleanest illustration available, because they come from one manufacturer and differ only in this. F-Log spends 106.1 code values per stop and stops at +5.34. F-Log2 spends 75.5 and reaches +8.34. Three extra stops of encoded highlight, bought by describing every stop about 29 percent more coarsely. That is the whole trade, in one pair of numbers from one company, with no sensor differences confounding it.

The second is toe shape, and here Canon Log 3 and Nikon N-Log genuinely differ from everyone else. Both spend far more code values per stop than any other format, 113.1 and 104.0 against 66 to 79 for the rest, and both stop at about 6.35 stops above middle grey. Over the matched window their shadow-to-highlight ratios are 0.343 and 0.376, roughly half the 0.65 of the Sony, Panasonic and ARRI group. Follow them down the ladder and you can see why. Canon Log 3 falls from 351 at middle grey to 134 at -6 stops, six code values above its own black floor of 128. N-Log falls from 372 to 141, fourteen above its floor of 127. The deep shadows are compressed into almost nothing, and the code values saved go upward, where both curves are the most generous in the set.

The third axis is what F-Log adds, and it is the one the seven-format version of this study could not see. F-Log has the second-steepest slope in the set at 106.1, which puts it next to N-Log and Canon Log 3, but it does not behave like them at all. Its matched-window ratio is 0.564, nowhere near their 0.376 and 0.343, and closer to Log3G10's 0.571. The reason is that a steep slope over a short range is generous in both directions: across the matched twelve stops F-Log consumes 975 code values, far more than any other format here — the next is Canon Log 3 at 849 — and it can afford that because it is only trying to cover 5.34 stops above grey. It is not a shadow curve or a highlight curve. It is a curve that describes a narrow range finely, which is a different design goal from either.

That has a practical consequence for Canon Log 3 and N-Log, and it is the one genuinely actionable thing here. On these two curves underexposure costs more than it does on the others, because the stops you push back up were encoded with very few code values to begin with. It is consistent with the way grading C-Log 3 footage and grading N-Log footage both reward getting exposure right in camera. It also explains part of why N-Log material is awkward to reconcile with other cameras on the same job, and why matching Nikon Z cameras to other bodies starts with the transform rather than the look.

One incidental finding is worth passing on, because it makes cross-manufacturer comparison fail silently. "IRE" is not one unit. Sony, Panasonic and Fujifilm all publish full range 10-bit code values alongside an IRE column that is legal-range referenced. ARRI's LogC4 specification publishes an IRE column that is the full range normalised signal, next to explicitly separate legal and full code value columns. So code value 95 is 3.5 IRE in Sony's and Fujifilm's tables and 9.29 IRE in ARRI's. Same signal, two numbers, both correct in their own document. If you have ever compared two manufacturers' exposure figures and found they disagreed by several IRE, this is often why, and it is a close cousin of the reason CST, ACES and LUT conversions look different on the same clip.

A note on the ceilings. The "top of curve" column is where each equation reaches full scale, applied identically to all nine because that is the only method available for every format. Where a manufacturer publishes a real clip point it is lower. Panasonic states a Varicam 35 clip at code 911 at every ISO, which is +6.49 stops rather than +8.00. ARRI publishes a LogC3 clipping level per exposure index, from 0.8128 at EI 160 to 1.0000 at EI 1600 and above; at EI 800 it is 0.9539, or code 976, which is +7.64 stops. LogC3's ceiling moves with exposure index. LogC4's does not, which was one of the stated reasons for the redesign.

Three formats were left out. Blackmagic distributes the Generation 5 white paper inside the Blackmagic RAW installer rather than as a citable public document, and a third-party transcription cannot be validated against anchors the manufacturer has not published. Apple's Log profile white paper sits behind an Apple ID sign-in. Sony publishes S-Log2 anchor code values but not the S-Log2 formula, so it could be quoted and not computed. A smaller comparison that holds up is worth more than a broad one that does not.

Frequently asked questions

Does more code values below middle grey mean cleaner shadows?

No. Code values control quantisation, not noise. Shadow noise is set by the sensor, the exposure and the ISO, and a curve applied afterwards cannot remove noise that is already in the signal. What a denser allocation does buy is headroom against banding when you lift those shadows hard in the grade, and even that only matters if the recording bit depth is low enough for quantisation to be the limiting factor rather than the noise floor.

Why does middle grey land in such different places?

Because the formats are encoding different amounts of total range into the same container, and because they inherit from different traditions. The curves that put black near code 95 are the Cineon-descended ones; Sony describes S-Log3 as based on the Cineon digital negative, and Canon says the same of Canon Log 2. The curves that put black near 128 are not. Where middle grey sits then follows from the black offset plus how many code values the curve spends per stop.

Which format puts the most code values in the shadows?

Fujifilm F-Log, on both measures: 375 code values between zero light and middle grey, and 40.4 percent of its own black-to-full-scale span spent below grey. Sony S-Log3 is second at 325 and 35.0 percent. That is not a recommendation — F-Log gets there by covering only 5.34 stops above middle grey, the shortest encoded range of the nine, so it is spending generously out of a smaller total rather than prioritising shadows over highlights. The two facts are the same fact.

Why do I get about 425 for S-Log3 instead of 325?

Because that method counts the code values below black as if they described shadow detail. It is worth walking through, because it is the answer you will get from most quick calculations and from several AI assistants, and the arithmetic is not the part that is wrong.

The method: S-Log3 spans -7 to 109 IRE across the 10-bit range, middle grey sits at 41 IRE, so scale the container linearly and you get (41 + 7) / (109 + 7) × 1024, which is 423.7. Nothing there is a mistake. Code value really is linear in IRE, so that number is a correct answer to the question "how many code values lie below middle grey".

The problem is that it starts counting at code 0, and S-Log3 does not put zero light at code 0. It puts it at code 95. Feed 0 percent reflectance through Sony's own formula and you get 95.0; feed it 18 percent and you get 420.0. The 95 code values underneath are deliberate room for signal that goes below black — negative excursions, noise that swings under the black point, footroom the Cineon-descended curves have always carried. They do not encode any light, so counting them tells you about the container rather than about the scene.

Subtract them and you get 420 − 95 = 325, which is the figure used throughout this article: code values spent between zero light and an 18 percent grey card. The gap between 325 and 424 is exactly the 95-value footroom plus rounding, and it is the difference between measuring the curve and measuring the file format.

Both numbers describe something real. Only one of them answers the question people are actually asking when they ask it, which is how finely the curve describes the part of the scene they can see.

How do F-Log and F-Log2 differ?

By how much scene range they encode, and they trade the obvious thing to get it. F-Log spends 106.1 code values per stop and reaches full scale 5.34 stops above middle grey. F-Log2 spends 75.5 and reaches it at 8.34. So F-Log2 buys three extra stops of encoded highlight by describing every stop about 29 percent more coarsely. They also disagree about middle grey by 70 code values — 470 against 400 — so a normalisation built for one is visibly wrong on the other. F-Log2 C shares F-Log2's curve exactly and differs only in gamut. There is a fuller walkthrough in how to grade F-Log and F-Log2 footage.

Do these numbers apply to 12-bit or RAW recording?

The shape conclusions do, since they are properties of the transfer function rather than of the container. The absolute counts do not transfer directly. In 12-bit the code values roughly quadruple, and Panasonic states this explicitly for V-Log, noting that the 12-bit code is four times the 10-bit value. For RAW there may be no log quantisation at all, in which case the curve is a viewing and grading convenience rather than the storage format.

Which format is best?

The question does not have an answer at this level, because allocation is only one input and the others matter more. These are nine different ways of dividing a fixed number of code values across scene light, and every one of them is a reasonable engineering compromise for the sensor it was designed around. The useful takeaway is narrower: on Canon Log 3 and N-Log the deep shadows carry noticeably fewer code values than on the others, so getting exposure right in camera pays back more on those two.

Sources

Sony, Technical Summary for S-Gamut3.Cine/S-Log3 and S-Gamut3/S-Log3: https://pro.sony/s3/cms-static-content/uploadfile/06/1237494271406.pdf

Panasonic, V-Log/V-Gamut Reference Manual Rev.1.0, 28 November 2014: https://pro-av.panasonic.net/en/cinema_camera_varicam_eva/support/pdf/VARICAM_V-Log_V-Gamut.pdf

Canon, Canon Log Gamma Curves white paper, 1 November 2018: https://www.usa.canon.com/content/dam/canon-assets/white-papers/pro/white-paper-canon-log-gamma-curves.pdf

ARRI, ALEXA Log C Curve, Usage in VFX, 9 March 2017: https://www.arri.com/resource/blob/31918/66f56e6abb6e5b6553929edf9aa7483e/2017-03-alexa-logc-curve-in-vfx-data.pdf

ARRI, ARRI LogC4 Logarithmic Color Space Specification, 23 January 2025: https://www.arri.com/resource/blob/278790/dc29f7399c1dc9553d329e27f1409a89/2022-05-arri-logc4-specification-data.pdf

RED Digital Cinema, White Paper on REDWideGamutRGB and Log3G10, form 915-0187 Rev C: https://docs.red.com/955-0187/PDF/915-0187%20Rev-C%20%20%20RED%20OPS,%20White%20Paper%20on%20REDWideGamutRGB%20and%20Log3G10.pdf

Nikon, N-Log Specification Document v1.0.0, 1 September 2018: https://download.nikonimglib.com/archive3/hDCmK00m9JDI03RPruD74xpoU905/N-Log_Specification_(En)01.pdf

Fujifilm, F-Log Data Sheet Ver.1.1: https://dl.fujifilm-x.com/support/lut/F-Log_DataSheet_E_Ver.1.1.pdf

Fujifilm, F-Log2 Data Sheet Ver.1.1: https://dl.fujifilm-x.com/technical-data/F-Log2_DataSheet_E_Ver.1.1.pdf

Every figure above is either quoted from one of those nine documents or computed from a formula in one of them. Nothing is estimated from sample footage, fitted to a LUT, or carried over from someone else's article. The whole calculation is about a hundred lines of arithmetic with no dependencies, so it is short enough to rebuild from the formulas as printed. If you do that and get different numbers, I would like to know.