Lines Matching refs:enc_options
118 static void DisableKeyframes(WebPAnimEncoderOptions* const enc_options) { in DisableKeyframes() argument
119 enc_options->kmax = INT_MAX; in DisableKeyframes()
120 enc_options->kmin = enc_options->kmax - 1; in DisableKeyframes()
125 static void SanitizeEncoderOptions(WebPAnimEncoderOptions* const enc_options) { in SanitizeEncoderOptions() argument
126 int print_warning = enc_options->verbose; in SanitizeEncoderOptions()
128 if (enc_options->minimize_size) { in SanitizeEncoderOptions()
129 DisableKeyframes(enc_options); in SanitizeEncoderOptions()
132 if (enc_options->kmax == 1) { // All frames will be key-frames. in SanitizeEncoderOptions()
133 enc_options->kmin = 0; in SanitizeEncoderOptions()
134 enc_options->kmax = 0; in SanitizeEncoderOptions()
136 } else if (enc_options->kmax <= 0) { in SanitizeEncoderOptions()
137 DisableKeyframes(enc_options); in SanitizeEncoderOptions()
141 if (enc_options->kmin >= enc_options->kmax) { in SanitizeEncoderOptions()
142 enc_options->kmin = enc_options->kmax - 1; in SanitizeEncoderOptions()
145 enc_options->kmin); in SanitizeEncoderOptions()
148 const int kmin_limit = enc_options->kmax / 2 + 1; in SanitizeEncoderOptions()
149 if (enc_options->kmin < kmin_limit && kmin_limit < enc_options->kmax) { in SanitizeEncoderOptions()
152 enc_options->kmin = kmin_limit; in SanitizeEncoderOptions()
156 enc_options->kmin); in SanitizeEncoderOptions()
161 if (enc_options->kmax - enc_options->kmin > MAX_CACHED_FRAMES) { in SanitizeEncoderOptions()
162 enc_options->kmin = enc_options->kmax - MAX_CACHED_FRAMES; in SanitizeEncoderOptions()
166 enc_options->kmin, MAX_CACHED_FRAMES); in SanitizeEncoderOptions()
169 assert(enc_options->kmin < enc_options->kmax); in SanitizeEncoderOptions()
174 static void DefaultEncoderOptions(WebPAnimEncoderOptions* const enc_options) { in DefaultEncoderOptions() argument
175 enc_options->anim_params.loop_count = 0; in DefaultEncoderOptions()
176 enc_options->anim_params.bgcolor = 0xffffffff; // White. in DefaultEncoderOptions()
177 enc_options->minimize_size = 0; in DefaultEncoderOptions()
178 DisableKeyframes(enc_options); in DefaultEncoderOptions()
179 enc_options->allow_mixed = 0; in DefaultEncoderOptions()
180 enc_options->verbose = 0; in DefaultEncoderOptions()
183 int WebPAnimEncoderOptionsInitInternal(WebPAnimEncoderOptions* enc_options, in WebPAnimEncoderOptionsInitInternal() argument
185 if (enc_options == NULL || in WebPAnimEncoderOptionsInitInternal()
189 DefaultEncoderOptions(enc_options); in WebPAnimEncoderOptionsInitInternal()
237 int width, int height, const WebPAnimEncoderOptions* enc_options, in WebPAnimEncoderNewInternal() argument
259 if (enc_options != NULL) { in WebPAnimEncoderNewInternal()
260 *(WebPAnimEncoderOptions*)&enc->options_ = *enc_options; in WebPAnimEncoderNewInternal()