avcodec/libjxlenc: use reciprocol gamma for GAMMA22 and GAMMA28
libjxl rejects JxlColorEncoding->gamma 2.2f or 2.8f and expects 1/2.2f or 1/2.8f, respectively. Signed-off-by: Leo Izen <leo.izen@gmail.com>
This commit is contained in:
parent
00a062b8d5
commit
1179bb703e
@ -335,11 +335,11 @@ static int libjxl_encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFra
|
||||
break;
|
||||
case AVCOL_TRC_GAMMA22:
|
||||
jxl_color.transfer_function = JXL_TRANSFER_FUNCTION_GAMMA;
|
||||
jxl_color.gamma = 2.2;
|
||||
jxl_color.gamma = 1/2.2f;
|
||||
break;
|
||||
case AVCOL_TRC_GAMMA28:
|
||||
jxl_color.transfer_function = JXL_TRANSFER_FUNCTION_GAMMA;
|
||||
jxl_color.gamma = 2.8;
|
||||
jxl_color.gamma = 1/2.8f;
|
||||
break;
|
||||
default:
|
||||
if (pix_desc->flags & AV_PIX_FMT_FLAG_FLOAT) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user