Leave the libsharpyuv default transfer function when not specified. (#3427) The default is currently kSharpYuvTransferFunctionSrgb but actually implements Rec709, see https://b.corp.google.com/issues/549724632 Remove the override to prevent tests from failing when the implementation is changed/fixed.
diff --git a/src/reformat_libsharpyuv.c b/src/reformat_libsharpyuv.c index a6bd523..6107ef3 100644 --- a/src/reformat_libsharpyuv.c +++ b/src/reformat_libsharpyuv.c
@@ -25,10 +25,7 @@ #if SHARPYUV_VERSION >= SHARPYUV_MAKE_VERSION(0, 4, 0) SharpYuvOptions options; SharpYuvOptionsInit(&matrix, &options); - if (image->transferCharacteristics == AVIF_TRANSFER_CHARACTERISTICS_UNSPECIFIED) { - // Set to sRGB for backward compatibility. - options.transfer_type = kSharpYuvTransferFunctionSrgb; - } else { + if (image->transferCharacteristics != AVIF_TRANSFER_CHARACTERISTICS_UNSPECIFIED) { options.transfer_type = (SharpYuvTransferFunctionType)image->transferCharacteristics; } const int sharpyuvRes = SharpYuvConvertWithOptions(&rgb->pixels[state->rgb.offsetBytesR],