{"course":{"slug":"motion-and-audio","title":"Motion, Sound and Music","url":"https://addaly.com/learn/motion-and-audio","level":"intermediate","track":"create"},"lesson":{"slug":"bit-depth-and-banding","title":"Counting the steps in a gradient","url":"https://addaly.com/learn/motion-and-audio/bit-depth-and-banding","position":41,"of":72,"minutes":10,"answer":"An 8-bit channel has 256 levels, so a fifty-level sky across a 1080-pixel frame has steps 21 pixels wide and bands visibly. And dither works by turning a structured quantisation edge into random error the.","keyIdea":"An 8-bit channel has 256 levels, so a fifty-level sky across a 1080-pixel frame has steps 21 pixels wide and bands visibly. And dither works by turning a structured quantisation edge into random error the eye integrates as smooth."},"body":{"format":"markdown","text":"## Count the steps in the gradient\n\nOpen a dark sky, a studio backdrop lit with a soft falloff, or a simple gradient behind a title, and you will often see distinct bands instead of a smooth ramp. The cause is arithmetic you can do in your head.\n\nAn 8-bit channel has 256 levels. Spread a gradient from black to white across a 1920-pixel-wide frame and each level covers about 7.5 pixels. Restrict it to a realistic range (a sky that runs from level 40 to level 90, fifty levels over 1080 pixels) and each step is 21 pixels wide.\n\nThe human visual system is very good at detecting an edge, including an edge of about 1 per cent in luminance between two large flat areas. A 21-pixel step is a visible line. This is **banding**, and it is not a compression artefact in origin; it is quantisation.\n\n## Ten bits, and why it fixes it\n\nA 10-bit channel has 1024 levels. The same fifty-level range is now two hundred levels, each step about 5 pixels wide, below the threshold at which the eye separates them for most content. 12-bit gives 4096.\n\nThat is the entire argument for higher bit depth, and it is specifically about **smooth gradients and heavy grading**, not about \"more colours\" in any sense that matters for a detailed image. A photograph of a forest has so much variation that 8 bits per channel is ample. A sunset, a studio cyclorama, a fade to black, or an image that has been pushed two stops in a grade, is where 8 bits runs out.\n\nGrading is the multiplier here. Lift the shadows of an 8-bit image by two stops and you are stretching perhaps 30 levels across the range where 120 used to be. Whatever banding was latent becomes obvious, and there is nothing to recover: the intermediate values were never recorded.\n\n## Encoding at 10-bit even from 8-bit sources\n\nThis surprises people: encoding an 8-bit source to a 10-bit output can produce a *better-looking* file at the same bitrate.\n\nThe reason is internal precision. The encoder's transforms, motion compensation and rounding all happen at the working bit depth. At 8 bits, rounding error accumulates through those stages and shows up as extra banding. At 10 bits there is enough headroom that the rounding stays below the visible threshold.\n\n```bash\nffmpeg -i in.mov -c:v libx265 -pix_fmt yuv420p10le -crf 22 out.mp4\n```\n\nFor HEVC this is the Main 10 profile, and support is broad: every modern phone and television decodes it. For H.264, the equivalent is High 10, and support is much patchier: many hardware decoders refuse it. So the practical advice splits: **10-bit HEVC or AV1, yes; 10-bit H.264, only if you control the players.**\n\n## Dithering: making the error invisible\n\nIf you must stay at 8 bits, the fix is to add a small amount of noise before quantising.\n\nThe mechanism is worth understanding because it is counter-intuitive. Without dither, a value sitting between two levels always rounds the same way, so an entire region snaps to the same level and its neighbour snaps to the next: a hard edge. With dither, the value plus a little noise rounds up in some pixels and down in others, in proportion to where it sat between them. The average across a region is now the correct value, and the edge has become a stochastic transition the eye integrates as smooth.\n\nYou have traded a visible structured error for an invisible random one. The same principle appears in audio, for exactly the same reason, when reducing from 24-bit to 16-bit.\n\n```bash\nffmpeg -i in.mov -vf \"gradfun=strength=1.2:radius=16\" -c:v libx264 -crf 20 out.mp4\n```\n\n`gradfun` is ffmpeg's debanding filter: it finds gradients, smooths them, and dithers the result. `deband` in other tool sets does the same. Use it lightly: too much strength smooths real detail.\n\nThe film-grain approach from the compositing module does the same job with a nicer texture: real or synthesised grain is dither, and it is why grainy footage does not band.\n\n## Where the depth is lost\n\nBit depth is a chain, and the lowest link sets the result.\n\n- **Camera.** Many consumer cameras record 8-bit internally even when the sensor reads more. A camera that records 10-bit 4:2:2 gives you a different grading range.\n- **The codec.** An 8-bit codec discards the rest no matter what fed it.\n- **The intermediate.** Rendering a graded sequence through an 8-bit intermediate and grading again is where a surprising amount of banding is introduced.\n- **The working space.** Compositing in 8 bits and applying several operations compounds rounding at each step. Float is the standard answer, and it is why EXR exists.\n- **The display.** Most laptop panels are 8-bit, some 6-bit with temporal dithering. You may not be able to see your own 10-bit file's advantage on the screen you are grading on.\n\nThat last point matters: banding visible on your monitor may be your monitor, and banding invisible on your monitor may still be visible on a viewer's television. Check on more than one display before you chase it.\n\n## The free path\n\n**ffmpeg** encodes 10-bit HEVC, VP9 and AV1, and has `gradfun` and grain filters. **DaVinci Resolve**'s free edition works in 32-bit float internally and exports 10-bit. **Blender** renders and composites in float and writes EXR. **ImageMagick** handles high-bit-depth stills. None of this is behind a paywall; the constraint is usually the camera and the display rather than the software.\n\n## The limitation\n\nBit depth is not free: 10-bit encoding is slower, files are larger, and hardware decode support varies by device and codec. And it cannot recover what was never captured: an 8-bit source graded aggressively will band regardless of what you encode it to, and adding bit depth at the end of the chain buys nothing.\n\nIt also does not save you from a badly-lit gradient. A backdrop with a steep falloff lit badly will band in 10 bits too. The ordering is: light it well, capture it deep, work in float, dither on the way out, and skipping any one of those is where the bands come from."},"check":{"question":"Why can encoding an 8-bit source to a 10-bit HEVC output produce a better-looking file at the same bitrate, given that the source has no extra information to carry?","options":[{"text":"The 10-bit encode stores the same values with more headroom, so any subsequent grading of the delivered file has more levels to stretch across.","correct":false,"tempting":"True of the delivered file's regrade potential, but the question is about how the file looks as encoded."},{"text":"The encoder's transforms and motion compensation run at the working bit depth, so the extra headroom keeps accumulated rounding error below the visible threshold.","correct":true},{"text":"10-bit encoding implies 4:2:2 chroma subsampling in the HEVC Main 10 profile, so colour resolution doubles alongside the bit depth.","correct":false,"tempting":"Bit depth and chroma subsampling are independent; Main 10 is commonly used with 4:2:0."},{"text":"A 10-bit encode applies dithering automatically when converting from the 8-bit source, and it is this dither, not the bit depth itself, that removes the banding, which means the same benefit is available by adding noise before an ordinary 8-bit encode.","correct":false,"tempting":"Conflates two genuine remedies: dither is a separate step the encoder does not insert on its own."}]},"prev":{"slug":"the-gamma-shift","title":"Why your export looks washed out","url":"https://addaly.com/learn/motion-and-audio/the-gamma-shift"},"next":{"slug":"log-and-luts","title":"Log footage and what a LUT is not","url":"https://addaly.com/learn/motion-and-audio/log-and-luts"},"authorship":"Founder and series editor: Dr Mustafa Mun. Written by AI models to a written standard. Exam keys checked blind by a second model: 3,665 of 3,666 agreed. Academic review invited.","review":{"status":"Draft, open for academic review"},"cite":"Addaly (2026) 'Counting the steps in a gradient', in Motion, Sound and Music. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/motion-and-audio/bit-depth-and-banding (Accessed: 13 October 2026).","licence":{"name":"CC BY-NC-SA 4.0","url":"https://creativecommons.org/licenses/by-nc-sa/4.0/"},"reader":{"schema":1,"title":"Counting the steps in a gradient","courseTitle":"Motion, Sound and Music","module":{"index":5,"slug":"codecs-colour-and-delivery","title":"Codecs, colour and delivery"},"answer":null,"keyIdea":"An 8-bit channel has 256 levels, so a fifty-level sky across a 1080-pixel frame has steps 21 pixels wide and bands visibly. And dither works by turning a structured quantisation edge into random error the eye integrates as smooth.","hero":{"kind":"plate","image":null,"alt":null,"caption":null},"blocks":[{"t":"h2","id":"count-the-steps-in-the-gradient","runs":[{"text":"Count the steps in the gradient"}]},{"t":"p","runs":[{"text":"Open a dark sky, a studio backdrop lit with a soft falloff, or a simple gradient behind a title, and you will often see distinct bands instead of a smooth ramp. The cause is arithmetic you can do in your head."}]},{"t":"p","runs":[{"text":"An 8-bit channel has 256 levels. Spread a gradient from black to white across a 1920-pixel-wide frame and each level covers about 7.5 pixels. Restrict it to a realistic range (a sky that runs from level 40 to level 90, fifty levels over 1080 pixels) and each step is 21 pixels wide."}]},{"t":"p","runs":[{"text":"The human visual system is very good at detecting an edge, including an edge of about 1 per cent in luminance between two large flat areas. A 21-pixel step is a visible line. This is "},{"text":"banding","b":true},{"text":", and it is not a compression artefact in origin; it is quantisation."}]},{"t":"h2","id":"ten-bits-and-why-it-fixes-it","runs":[{"text":"Ten bits, and why it fixes it"}]},{"t":"p","runs":[{"text":"A 10-bit channel has 1024 levels. The same fifty-level range is now two hundred levels, each step about 5 pixels wide, below the threshold at which the eye separates them for most content. 12-bit gives 4096."}]},{"t":"p","runs":[{"text":"That is the entire argument for higher bit depth, and it is specifically about "},{"text":"smooth gradients and heavy grading","b":true},{"text":", not about “more colours” in any sense that matters for a detailed image. A photograph of a forest has so much variation that 8 bits per channel is ample. A sunset, a studio cyclorama, a fade to black, or an image that has been pushed two stops in a grade, is where 8 bits runs out."}]},{"t":"p","runs":[{"text":"Grading is the multiplier here. Lift the shadows of an 8-bit image by two stops and you are stretching perhaps 30 levels across the range where 120 used to be. Whatever banding was latent becomes obvious, and there is nothing to recover: the intermediate values were never recorded."}]},{"t":"h2","id":"encoding-at-10-bit-even-from-8-bit-sources","runs":[{"text":"Encoding at 10-bit even from 8-bit sources"}]},{"t":"p","runs":[{"text":"This surprises people: encoding an 8-bit source to a 10-bit output can produce a "},{"text":"better-looking","i":true},{"text":" file at the same bitrate."}]},{"t":"p","runs":[{"text":"The reason is internal precision. The encoder’s transforms, motion compensation and rounding all happen at the working bit depth. At 8 bits, rounding error accumulates through those stages and shows up as extra banding. At 10 bits there is enough headroom that the rounding stays below the visible threshold."}]},{"t":"code","lang":"bash","label":"Bash","text":"ffmpeg -i in.mov -c:v libx265 -pix_fmt yuv420p10le -crf 22 out.mp4"},{"t":"p","runs":[{"text":"For HEVC this is the Main 10 profile, and support is broad: every modern phone and television decodes it. For H.264, the equivalent is High 10, and support is much patchier: many hardware decoders refuse it. So the practical advice splits: "},{"text":"10-bit HEVC or AV1, yes; 10-bit H.264, only if you control the players.","b":true}]},{"t":"h2","id":"dithering-making-the-error-invisible","runs":[{"text":"Dithering: making the error invisible"}]},{"t":"p","runs":[{"text":"If you must stay at 8 bits, the fix is to add a small amount of noise before quantising."}]},{"t":"p","runs":[{"text":"The mechanism is worth understanding because it is counter-intuitive. Without dither, a value sitting between two levels always rounds the same way, so an entire region snaps to the same level and its neighbour snaps to the next: a hard edge. With dither, the value plus a little noise rounds up in some pixels and down in others, in proportion to where it sat between them. The average across a region is now the correct value, and the edge has become a stochastic transition the eye integrates as smooth."}]},{"t":"p","runs":[{"text":"You have traded a visible structured error for an invisible random one. The same principle appears in audio, for exactly the same reason, when reducing from 24-bit to 16-bit."}]},{"t":"code","lang":"bash","label":"Bash","text":"ffmpeg -i in.mov -vf \"gradfun=strength=1.2:radius=16\" -c:v libx264 -crf 20 out.mp4"},{"t":"p","runs":[{"text":"gradfun","code":true},{"text":" is ffmpeg’s debanding filter: it finds gradients, smooths them, and dithers the result. "},{"text":"deband","code":true},{"text":" in other tool sets does the same. Use it lightly: too much strength smooths real detail."}]},{"t":"p","runs":[{"text":"The film-grain approach from the compositing module does the same job with a nicer texture: real or synthesised grain is dither, and it is why grainy footage does not band."}]},{"t":"h2","id":"where-the-depth-is-lost","runs":[{"text":"Where the depth is lost"}]},{"t":"p","runs":[{"text":"Bit depth is a chain, and the lowest link sets the result."}]},{"t":"ul","items":[[{"text":"Camera.","b":true},{"text":" Many consumer cameras record 8-bit internally even when the sensor reads more. A camera that records 10-bit 4:2:2 gives you a different grading range."}],[{"text":"The codec.","b":true},{"text":" An 8-bit codec discards the rest no matter what fed it."}],[{"text":"The intermediate.","b":true},{"text":" Rendering a graded sequence through an 8-bit intermediate and grading again is where a surprising amount of banding is introduced."}],[{"text":"The working space.","b":true},{"text":" Compositing in 8 bits and applying several operations compounds rounding at each step. Float is the standard answer, and it is why EXR exists."}],[{"text":"The display.","b":true},{"text":" Most laptop panels are 8-bit, some 6-bit with temporal dithering. You may not be able to see your own 10-bit file’s advantage on the screen you are grading on."}]]},{"t":"p","runs":[{"text":"That last point matters: banding visible on your monitor may be your monitor, and banding invisible on your monitor may still be visible on a viewer’s television. Check on more than one display before you chase it."}]},{"t":"h2","id":"the-free-path","runs":[{"text":"The free path"}],"role":"free"},{"t":"p","runs":[{"text":"ffmpeg","b":true},{"text":" encodes 10-bit HEVC, VP9 and AV1, and has "},{"text":"gradfun","code":true},{"text":" and grain filters. "},{"text":"DaVinci Resolve","b":true},{"text":"’s free edition works in 32-bit float internally and exports 10-bit. "},{"text":"Blender","b":true},{"text":" renders and composites in float and writes EXR. "},{"text":"ImageMagick","b":true},{"text":" handles high-bit-depth stills. None of this is behind a paywall; the constraint is usually the camera and the display rather than the software."}]},{"t":"h2","id":"the-limitation","runs":[{"text":"The limitation"}],"role":"limit"},{"t":"p","runs":[{"text":"Bit depth is not free: 10-bit encoding is slower, files are larger, and hardware decode support varies by device and codec. And it cannot recover what was never captured: an 8-bit source graded aggressively will band regardless of what you encode it to, and adding bit depth at the end of the chain buys nothing."}]},{"t":"p","runs":[{"text":"It also does not save you from a badly-lit gradient. A backdrop with a steep falloff lit badly will band in 10 bits too. The ordering is: light it well, capture it deep, work in float, dither on the way out, and skipping any one of those is where the bands come from."}]}],"check":{"question":[{"text":"Why can encoding an 8-bit source to a 10-bit HEVC output produce a better-looking file at the same bitrate, given that the source has no extra information to carry?"}],"options":[{"text":[{"text":"The 10-bit encode stores the same values with more headroom, so any subsequent grading of the delivered file has more levels to stretch across."}],"correct":false,"tempting":[{"text":"True of the delivered file’s regrade potential, but the question is about how the file looks as encoded."}]},{"text":[{"text":"The encoder’s transforms and motion compensation run at the working bit depth, so the extra headroom keeps accumulated rounding error below the visible threshold."}],"correct":true,"tempting":null},{"text":[{"text":"10-bit encoding implies 4:2:2 chroma subsampling in the HEVC Main 10 profile, so colour resolution doubles alongside the bit depth."}],"correct":false,"tempting":[{"text":"Bit depth and chroma subsampling are independent; Main 10 is commonly used with 4:2:0."}]},{"text":[{"text":"A 10-bit encode applies dithering automatically when converting from the 8-bit source, and it is this dither, not the bit depth itself, that removes the banding, which means the same benefit is available by adding noise before an ordinary 8-bit encode."}],"correct":false,"tempting":[{"text":"Conflates two genuine remedies: dither is a separate step the encoder does not insert on its own."}]}],"order":[0,3,2,1],"why":null},"prev":{"slug":"the-gamma-shift","title":"Why your export looks washed out","minutes":10},"next":{"slug":"log-and-luts","title":"Log footage and what a LUT is not","minutes":11}}}