A method of decoding video data, the method comprising: receiving, from an encoded video bitstream, a palette mode encoded block of video data of a picture; receiving, from the encoded video bitstream, encoded palette mode information for the palette mode encoded block of video data, wherein the encoded palette mode information includes a plurality of instances of a first syntax element, the first syntax element being an indication of an index to an array of palette entries or specifying a quantized escape coded sample value for a color component corresponding to an escape sample, and a plurality of syntax elements that are different from the first syntax element and that includes a syntax element that specifies an index of a most significant bit in a binary representation of a variable representing run length and a syntax element that specifies a run type mode; decoding, using a context-based adaptive binary arithmetic coding bypass mode, the plurality of instances of the first syntax element; decoding, using a context-based adaptive binary arithmetic coding context mode, the plurality of syntax elements that are different from the first syntax element; and decoding the palette mode encoded block of video data using the decoded plurality of instances of the first syntax element and the decoded plurality of syntax elements that are different from the first syntax element, characterized in that the plurality of instances of the first syntax element are grouped together in the received encoded video bitstream such that switching between a context-based adaptive binary arithmetic coding bypass mode and a context-based adaptive binary arithmetic coding context mode while decoding the palette mode encoded block of video data is reduced. receiving, from an encoded video bitstream, a palette mode encoded block of video data of a picture; receiving, from the encoded video bitstream, encoded palette mode information for the palette mode encoded block of video data, wherein the encoded palette mode information includes a plurality of instances of a first syntax element, the first syntax element being an indication of an index to an array of palette entries or specifying a quantized escape coded sample value for a color component corresponding to an escape sample, and a plurality of syntax elements that are different from the first syntax element and that includes a syntax element that specifies an index of a most significant bit in a binary representation of a variable representing run length and a syntax element that specifies a run type mode; decoding, using a context-based adaptive binary arithmetic coding bypass mode, the plurality of instances of the first syntax element; decoding, using a context-based adaptive binary arithmetic coding context mode, the plurality of syntax elements that are different from the first syntax element; and decoding the palette mode encoded block of video data using the decoded plurality of instances of the first syntax element and the decoded plurality of syntax elements that are different from the first syntax element, characterized in that the plurality of instances of the first syntax element are grouped together in the received encoded video bitstream such that switching between a context-based adaptive binary arithmetic coding bypass mode and a context-based adaptive binary arithmetic coding context mode while decoding the palette mode encoded block of video data is reduced.