Systems, methods and apparatus for video processing are described. The video processing may include video encoding, video decoding, or video transcoding. One example method of video processing includes performing a conversion between a video and a bitstream of the video according to a format rule. The format rule specifies that constraints on values of one or more first syntax elements in an adaptation parameter set are defined based on semantics of second syntax elements in a picture header and/or a slice header if a picture or a slice referring to the adaptation parameter set.