Lines 92-98
static avifResult svtCodecEncodeImage(avifCodec * codec,
Link Here
|
92 |
} |
92 |
} |
93 |
svt_config->encoder_color_format = color_format; |
93 |
svt_config->encoder_color_format = color_format; |
94 |
svt_config->encoder_bit_depth = (uint8_t)image->depth; |
94 |
svt_config->encoder_bit_depth = (uint8_t)image->depth; |
|
|
95 |
#if !SVT_AV1_CHECK_VERSION(0, 9, 0) |
95 |
svt_config->is_16bit_pipeline = image->depth > 8; |
96 |
svt_config->is_16bit_pipeline = image->depth > 8; |
|
|
97 |
#endif |
96 |
|
98 |
|
97 |
// Follow comment in svt header: set if input is HDR10 BT2020 using SMPTE ST2084. |
99 |
// Follow comment in svt header: set if input is HDR10 BT2020 using SMPTE ST2084. |
98 |
svt_config->high_dynamic_range_input = (image->depth == 10 && image->colorPrimaries == AVIF_COLOR_PRIMARIES_BT2020 && |
100 |
svt_config->high_dynamic_range_input = (image->depth == 10 && image->colorPrimaries == AVIF_COLOR_PRIMARIES_BT2020 && |
Lines 104-111
static avifResult svtCodecEncodeImage(avifCodec * codec,
Link Here
|
104 |
svt_config->logical_processors = encoder->maxThreads; |
106 |
svt_config->logical_processors = encoder->maxThreads; |
105 |
svt_config->enable_adaptive_quantization = AVIF_FALSE; |
107 |
svt_config->enable_adaptive_quantization = AVIF_FALSE; |
106 |
// disable 2-pass |
108 |
// disable 2-pass |
|
|
109 |
#if SVT_AV1_CHECK_VERSION(0, 9, 0) |
110 |
svt_config->rc_stats_buffer = (SvtAv1FixedBuf) { NULL, 0 }; |
111 |
#else |
107 |
svt_config->rc_firstpass_stats_out = AVIF_FALSE; |
112 |
svt_config->rc_firstpass_stats_out = AVIF_FALSE; |
108 |
svt_config->rc_twopass_stats_in = (SvtAv1FixedBuf) { NULL, 0 }; |
113 |
svt_config->rc_twopass_stats_in = (SvtAv1FixedBuf) { NULL, 0 }; |
|
|
114 |
#endif |
109 |
|
115 |
|
110 |
if (alpha) { |
116 |
if (alpha) { |
111 |
svt_config->min_qp_allowed = AVIF_CLAMP(encoder->minQuantizerAlpha, 0, 63); |
117 |
svt_config->min_qp_allowed = AVIF_CLAMP(encoder->minQuantizerAlpha, 0, 63); |