A method of decoding video data, the method comprising: receiving an encoded binary prediction vector for a current block of video data; decoding the encoded binary prediction vector using a run-length decoding technique, wherein the run-length decoding technique comprises: decoding the encoded binary prediction vector to obtain decoded run-length values; for each decoded run-length value: if the decoded run-length value is larger than a reserved run-length value L, subtracting 1 from the decoded run-length value to give an actual run-length value which specifies a number of consecutive zeros preceding a non-zero value, if the decoded run-length value is smaller than the reserved run-length value L, using the decoded run-length value as the actual run-length value, or if the decoded run-length value is equal to the reserved run-length value L, determining that no further non-zero values are present in the binary prediction vector; generating a palette for the current block of video data based on the binary prediction vector, the binary prediction vector comprising entries indicating whether or not previously-used palette entries are reused for the palette for the current block of video data; and decoding the current block of video data using the palette. receiving an encoded binary prediction vector for a current block of video data; decoding the encoded binary prediction vector using a run-length decoding technique, wherein the run-length decoding technique comprises: decoding the encoded binary prediction vector to obtain decoded run-length values; for each decoded run-length value: if the decoded run-length value is larger than a reserved run-length value L, subtracting 1 from the decoded run-length value to give an actual run-length value which specifies a number of consecutive zeros preceding a non-zero value, if the decoded run-length value is smaller than the reserved run-length value L, using the decoded run-length value as the actual run-length value, or if the decoded run-length value is equal to the reserved run-length value L, determining that no further non-zero values are present in the binary prediction vector; generating a palette for the current block of video data based on the binary prediction vector, the binary prediction vector comprising entries indicating whether or not previously-used palette entries are reused for the palette for the current block of video data; and decoding the current block of video data using the palette. decoding the encoded binary prediction vector to obtain decoded run-length values; for each decoded run-length value: if the decoded run-length value is larger than a reserved run-length value L, subtracting 1 from the decoded run-length value to give an actual run-length value which specifies a number of consecutive zeros preceding a non-zero value, if the decoded run-length value is smaller than the reserved run-length value L, using the decoded run-length value as the actual run-length value, or if the decoded run-length value is equal to the reserved run-length value L, determining that no further non-zero values are present in the binary prediction vector; if the decoded run-length value is larger than a reserved run-length value L, subtracting 1 from the decoded run-length value to give an actual run-length value which specifies a number of consecutive zeros preceding a non-zero value, if the decoded run-length value is smaller than the reserved run-length value L, using the decoded run-length value as the actual run-length value, or generating a palette for the current block of video data based on the binary prediction vector, the binary prediction vector comprising entries indicating whether or not previously-used palette entries are reused for the palette for the current block of video data; and decoding the current block of video data using the palette.