avcodec/tiff: Check palette shift