<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "QuickTime File Format",
  "identifier" : "/documentation/quicktime-file-format/Composition_shift_least_greatest_atom",
  "metadataVersion" : "0.1.0",
  "role" : "Atom",
  "symbol" : {
    "kind" : "Atom",
    "modules" : [
      "QuickTime File Format"
    ],
    "preciseIdentifier" : "__docc_universal_symbol_reference_$Composition_shift_least_greatest_atom"
  },
  "title" : "Composition shift least greatest atom ('cslg')"
}
-->

# Composition shift least greatest atom ('cslg')

An atom that summarizes the calculated minimum and maximum offsets between decode and composition time, as well as the start and end times, for all samples.

## Overview

The optional composition shift least greatest atom summarizes the calculated minimum and maximum offsets between decode and composition time, as well as the start and end times, for all samples. This allows a reader to determine the minimum required time for decode to obtain proper presentation order without needing to scan the sample table for the range of offsets. The type of the composition shift least greatest atom is `‘cslg’`.

The layout of a composition shift least greatest atom is as follows.

|Composition shift least greatest atom data field                                                                                        |Bytes|
|----------------------------------------------------------------------------------------------------------------------------------------|-----|
|``doc://com.apple.qtff/documentation/quicktime-file-format/Composition_shift_least_greatest_atom/Size``                                 |4    |
|``doc://com.apple.qtff/documentation/quicktime-file-format/Composition_shift_least_greatest_atom/Type`` = `'cslg'`                      |4    |
|``doc://com.apple.qtff/documentation/quicktime-file-format/Composition_shift_least_greatest_atom/Version``                              |1    |
|``doc://com.apple.qtff/documentation/quicktime-file-format/Composition_shift_least_greatest_atom/Flags``                                |3    |
|``doc://com.apple.qtff/documentation/quicktime-file-format/Composition_shift_least_greatest_atom/compositionOffsetToDisplayOffsetShift``|4    |
|``doc://com.apple.qtff/documentation/quicktime-file-format/Composition_shift_least_greatest_atom/leastDisplayOffset``                   |4    |
|``doc://com.apple.qtff/documentation/quicktime-file-format/Composition_shift_least_greatest_atom/greatestDisplayOffset``                |4    |
|``doc://com.apple.qtff/documentation/quicktime-file-format/Composition_shift_least_greatest_atom/displayStartTime``                     |4    |
|``doc://com.apple.qtff/documentation/quicktime-file-format/Composition_shift_least_greatest_atom/displayEndTime``                       |4    |

## Topics

### Data fields

[`Size`](/documentation/quicktime-file-format/Composition_shift_least_greatest_atom/Size)

A 32-bit integer that specifies the number of bytes in the composition shift least greatest atom atom.

[`Type`](/documentation/quicktime-file-format/Composition_shift_least_greatest_atom/Type)

A 32-bit integer that identifies the atom type.

[`Version`](/documentation/quicktime-file-format/Composition_shift_least_greatest_atom/Version)

A 1-byte specification of the version of this atom.

[`Flags`](/documentation/quicktime-file-format/Composition_shift_least_greatest_atom/Flags)

A 3-byte space reserved for flags.

[`compositionOffsetToDisplayOffsetShift`](/documentation/quicktime-file-format/Composition_shift_least_greatest_atom/compositionOffsetToDisplayOffsetShift)

A 32-bit unsigned integer that specifies the calculated value.

[`leastDisplayOffset`](/documentation/quicktime-file-format/Composition_shift_least_greatest_atom/leastDisplayOffset)

A 32-bit unsigned integer that specifies the calculated value.

[`greatestDisplayOffset`](/documentation/quicktime-file-format/Composition_shift_least_greatest_atom/greatestDisplayOffset)

A 32-bit unsigned integer that specifies the calculated value.

[`displayStartTime`](/documentation/quicktime-file-format/Composition_shift_least_greatest_atom/displayStartTime)

A 32-bit signed integer that specifies the calculated value.

[`displayEndTime`](/documentation/quicktime-file-format/Composition_shift_least_greatest_atom/displayEndTime)

A 32-bit signed integer that specifies the calculated value.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)