@@ -114,7 +114,11 @@ static avifResult svtCodecEncodeImage(avifCodec * codec,
114
114
// See https://gitlab.com/AOMediaCodec/SVT-AV1/-/issues/1697.
115
115
memset (svt_config , 0 , sizeof (EbSvtAv1EncConfiguration ));
116
116
117
+ #if SVT_AV1_CHECK_VERSION (3 , 0 , 0 )
118
+ res = svt_av1_enc_init_handle (& codec -> internal -> svt_encoder , svt_config );
119
+ #else
117
120
res = svt_av1_enc_init_handle (& codec -> internal -> svt_encoder , NULL , svt_config );
121
+ #endif
118
122
if (res != EB_ErrorNone ) {
119
123
goto cleanup ;
120
124
}
@@ -125,14 +129,18 @@ static avifResult svtCodecEncodeImage(avifCodec * codec,
125
129
svt_config -> is_16bit_pipeline = image -> depth > 8 ;
126
130
#endif
127
131
132
+ #if !SVT_AV1_CHECK_VERSION (1 , 5 , 0 )
128
133
// Follow comment in svt header: set if input is HDR10 BT2020 using SMPTE ST2084 (PQ).
129
134
svt_config -> high_dynamic_range_input = (image -> depth == 10 && image -> colorPrimaries == AVIF_COLOR_PRIMARIES_BT2020 &&
130
135
image -> transferCharacteristics == AVIF_TRANSFER_CHARACTERISTICS_SMPTE2084 &&
131
136
image -> matrixCoefficients == AVIF_MATRIX_COEFFICIENTS_BT2020_NCL );
137
+ #endif
132
138
133
139
svt_config -> source_width = image -> width ;
134
140
svt_config -> source_height = image -> height ;
135
- svt_config -> logical_processors = encoder -> maxThreads ;
141
+ #if SVT_AV1_CHECK_VERSION (3 , 0 , 0 )
142
+ svt_config -> level_of_parallelism = encoder -> maxThreads ;
143
+ #endif
136
144
svt_config -> enable_adaptive_quantization = 2 ;
137
145
// disable 2-pass
138
146
#if SVT_AV1_CHECK_VERSION (0 , 9 , 0 )
0 commit comments