Use a reasonable default for unspecified YUV colorspace

This commit is contained in:
Sam Lantinga 2024-02-05 11:20:14 -08:00
parent 240158f3e8
commit c3e4481d56
8 changed files with 138 additions and 87 deletions

View file

@ -680,7 +680,7 @@ static int GL_CreateTexture(SDL_Renderer *renderer, SDL_Texture *texture, SDL_Pr
data->shader = SHADER_NV21_RA;
}
}
data->shader_params = SDL_GetYCbCRtoRGBConversionMatrix(texture->colorspace);
data->shader_params = SDL_GetYCbCRtoRGBConversionMatrix(texture->colorspace, texture->w, texture->h, 8);
if (!data->shader_params) {
return SDL_SetError("Unsupported YUV colorspace");
}