56#define DT_IOP_ORDER_VERSION 5
58#define DT_IOP_ORDER_INFO (dt_get_debug_flags() & DT_DEBUG_IOPORDER)
62 const int multi_priority);
98 { { 0.5f },
"basebuffer", 0},
99 { { 1.0f },
"rawprepare", 0},
100 { { 2.0f },
"invert", 0},
101 { { 2.5f },
"rawdenoiseai", 0},
102 { { 3.0f },
"temperature", 0},
103 { { 4.0f },
"highlights", 0},
104 { { 5.0f },
"cacorrect", 0},
105 { { 6.0f },
"hotpixels", 0},
106 { { 7.0f },
"rawdenoise", 0},
107 { { 8.0f },
"demosaic", 0},
108 { { 8.5f },
"detailmask", 0},
109 { { 9.0f },
"mask_manager", 0},
110 { {10.0f },
"denoiseprofile", 0},
111 { {11.0f },
"tonemap", 0},
112 { {12.0f },
"exposure", 0},
113 { {13.0f },
"spots", 0},
114 { {14.0f },
"retouch", 0},
115 { {15.0f },
"lens", 0},
116 { {15.5f },
"cacorrectrgb", 0},
117 { {15.5f },
"initialscale", 0},
118 { {16.0f },
"ashift", 0},
119 { {17.0f },
"liquify", 0},
120 { {18.0f },
"rotatepixels", 0},
121 { {19.0f },
"scalepixels", 0},
122 { {20.0f },
"flip", 0},
123 { {21.0f },
"clipping", 0},
124 { {21.5f },
"toneequal", 0},
125 { {21.7f },
"crop", 0},
126 { {22.0f },
"graduatednd", 0},
127 { {23.0f },
"basecurve", 0},
128 { {24.0f },
"bilateral", 0},
129 { {25.0f },
"profile_gamma", 0},
130 { {26.0f },
"hazeremoval", 0},
131 { {27.0f },
"colorin", 0},
132 { {27.5f },
"channelmixerrgb", 0},
133 { {27.5f },
"diffuse", 0},
134 { {27.5f },
"censorize", 0},
135 { {27.5f },
"negadoctor", 0},
136 { {27.5f },
"blurs", 0},
137 { {27.5f },
"basicadj", 0},
138 { {28.0f },
"colorreconstruct", 0},
139 { {29.0f },
"colorchecker", 0},
140 { {30.0f },
"defringe", 0},
141 { {31.0f },
"equalizer", 0},
142 { {32.0f },
"vibrance", 0},
143 { {33.0f },
"colorbalance", 0},
144 { {33.4f },
"splittoningrgb", 0},
145 { {33.45f },
"colorprimaries", 0},
146 { {33.5f },
"colorbalancergb", 0},
147 { {33.6f },
"colorequal", 0},
148 { {33.7f },
"drawlayer", 0},
149 { {34.0f },
"colorize", 0},
150 { {36.0f },
"colormapping", 0},
151 { {37.0f },
"bloom", 0},
152 { {38.0f },
"nlmeans", 0},
153 { {39.0f },
"globaltonemap", 0},
154 { {40.0f },
"shadhi", 0},
155 { {41.0f },
"atrous", 0},
156 { {42.0f },
"bilat", 0},
157 { {43.0f },
"colorzones", 0},
158 { {44.0f },
"lowlight", 0},
159 { {45.0f },
"monochrome", 0},
160 { {46.0f },
"filmic", 0},
161 { {46.25f },
"crystgrain", 0},
162 { {46.5f },
"filmicrgb", 0},
163 { {47.0f },
"colisa", 0},
164 { {48.0f },
"zonesystem", 0},
165 { {49.0f },
"tonecurve", 0},
166 { {50.0f },
"levels", 0},
167 { {50.2f },
"rgblevels", 0},
168 { {50.5f },
"rgbcurve", 0},
169 { {51.0f },
"relight", 0},
170 { {52.0f },
"colorcorrection", 0},
171 { {53.0f },
"sharpen", 0},
172 { {54.0f },
"lowpass", 0},
173 { {55.0f },
"highpass", 0},
174 { {56.0f },
"grain", 0},
175 { {56.5f },
"lut3d", 0},
176 { {57.0f },
"colorcontrast", 0},
177 { {58.0f },
"colorout", 0},
178 { {59.0f },
"channelmixer", 0},
179 { {60.0f },
"soften", 0},
180 { {61.0f },
"vignette", 0},
181 { {62.0f },
"splittoning", 0},
182 { {63.0f },
"velvia", 0},
183 { {65.0f },
"finalscale", 0},
184 { {66.0f },
"overexposed", 0},
185 { {67.0f },
"rawoverexposed", 0},
186 { {67.5f },
"dither", 0},
187 { {68.0f },
"borders", 0},
188 { {69.0f },
"watermark", 0},
189 { {71.0f },
"gamma", 0},
195 { { 0.5 },
"basebuffer", 0},
196 { { 1.0 },
"rawprepare", 0},
197 { { 2.0 },
"invert", 0},
198 { { 2.5f },
"rawdenoiseai", 0},
199 { { 3.0f },
"temperature", 0},
200 { { 4.0f },
"highlights", 0},
201 { { 5.0f },
"cacorrect", 0},
202 { { 6.0f },
"hotpixels", 0},
203 { { 7.0f },
"rawdenoise", 0},
204 { { 8.0f },
"demosaic", 0},
205 { { 8.5f },
"detailmask", 0},
206 { { 9.0f },
"denoiseprofile", 0},
207 { {10.0f },
"bilateral", 0},
208 { {11.0f },
"rotatepixels", 0},
209 { {12.0f },
"scalepixels", 0},
210 { {13.0f },
"lens", 0},
211 { {13.5f },
"cacorrectrgb", 0},
213 { {14.0f },
"hazeremoval", 0},
214 { {14.0f },
"initialscale", 0},
215 { {15.0f },
"ashift", 0},
216 { {16.0f },
"flip", 0},
217 { {17.0f },
"clipping", 0},
218 { {18.0f },
"liquify", 0},
219 { {19.0f },
"spots", 0},
220 { {20.0f },
"retouch", 0},
221 { {21.0f },
"exposure", 0},
222 { {22.0f },
"mask_manager", 0},
223 { {23.0f },
"tonemap", 0},
224 { {24.0f },
"toneequal", 0},
225 { {24.5f },
"crop", 0},
226 { {25.0f },
"graduatednd", 0},
227 { {26.0f },
"profile_gamma", 0},
228 { {28.0f },
"colorin", 0},
229 { {28.5f },
"channelmixerrgb", 0},
230 { {28.5f },
"diffuse", 0},
231 { {28.5f },
"censorize", 0},
232 { {28.5f },
"negadoctor", 0},
233 { {28.5f },
"blurs", 0},
234 { {29.0f },
"nlmeans", 0},
236 { {30.0f },
"colorchecker", 0},
239 { {31.0f },
"defringe", 0},
241 { {32.0f },
"atrous", 0},
242 { {33.0f },
"lowpass", 0},
243 { {34.0f },
"highpass", 0},
244 { {35.0f },
"sharpen", 0},
246 { {37.0f },
"colortransfer", 0},
250 { {38.0f },
"colormapping", 0},
251 { {39.0f },
"channelmixer", 0},
255 { {40.0f },
"basicadj", 0},
256 { {41.0f },
"colorbalance", 0},
257 { {41.4f },
"splittoningrgb", 0},
258 { {41.45f },
"colorprimaries", 0},
259 { {41.5f },
"colorbalancergb", 0},
260 { {41.6f },
"colorequal", 0},
261 { {41.7f },
"drawlayer", 0},
262 { {42.0f },
"rgbcurve", 0},
263 { {43.0f },
"rgblevels", 0},
264 { {44.0f },
"basecurve", 0},
266 { {45.0f },
"filmic", 0},
267 { {45.5f },
"crystgrain", 0},
268 { {46.0f },
"filmicrgb", 0},
269 { {36.0f },
"lut3d", 0},
270 { {47.0f },
"colisa", 0},
271 { {48.0f },
"tonecurve", 0},
272 { {49.0f },
"levels", 0},
273 { {50.0f },
"shadhi", 0},
274 { {51.0f },
"zonesystem", 0},
275 { {52.0f },
"globaltonemap", 0},
276 { {53.0f },
"relight", 0},
277 { {54.0f },
"bilat", 0},
279 { {55.0f },
"colorcorrection", 0},
281 { {56.0f },
"colorcontrast", 0},
282 { {57.0f },
"velvia", 0},
283 { {58.0f },
"vibrance", 0},
284 { {60.0f },
"colorzones", 0},
285 { {61.0f },
"bloom", 0},
286 { {62.0f },
"colorize", 0},
287 { {63.0f },
"lowlight", 0},
288 { {64.0f },
"monochrome", 0},
289 { {65.0f },
"grain", 0},
290 { {66.0f },
"soften", 0},
291 { {67.0f },
"splittoning", 0},
292 { {68.0f },
"vignette", 0},
293 { {69.0f },
"colorreconstruct", 0},
294 { {70.0f },
"colorout", 0},
295 { {72.0f },
"finalscale", 0},
296 { {73.0f },
"overexposed", 0},
297 { {74.0f },
"rawoverexposed", 0},
298 { {75.0f },
"dither", 0},
299 { {76.0f },
"borders", 0},
300 { {77.0f },
"watermark", 0},
301 { {78.0f },
"gamma", 0},
308 { { 0.5 },
"basebuffer", 0 },
309 { { 1.0 },
"rawprepare", 0 },
310 { { 2.0 },
"invert", 0 },
311 { { 2.5f },
"rawdenoiseai", 0 },
312 { { 3.0f },
"temperature", 0 },
313 { { 4.0f },
"highlights", 0 },
314 { { 5.0f },
"cacorrect", 0 },
315 { { 6.0f },
"hotpixels", 0 },
316 { { 7.0f },
"rawdenoise", 0 },
317 { { 8.0f },
"demosaic", 0 },
318 { { 8.5f },
"detailmask", 0 },
320 { { 28.0f },
"colorin", 0 },
322 { { 28.0f },
"denoiseprofile", 0},
323 { { 28.0f },
"bilateral", 0},
324 { { 28.0f },
"rotatepixels", 0},
325 { { 28.0f },
"scalepixels", 0},
326 { { 28.0f },
"lens", 0},
327 { { 28.0f },
"cacorrectrgb", 0},
329 { { 28.0f },
"hazeremoval", 0},
330 { { 28.0f },
"initialscale", 0 },
331 { { 28.0f },
"ashift", 0},
332 { { 28.0f },
"flip", 0},
333 { { 28.0f },
"clipping", 0},
334 { { 28.0f },
"liquify", 0},
335 { { 28.0f },
"spots", 0},
336 { { 28.0f },
"retouch", 0},
337 { { 28.0f },
"exposure", 0},
338 { { 28.0f },
"mask_manager", 0},
339 { { 28.0f },
"tonemap", 0},
340 { { 28.0f },
"toneequal", 0},
341 { { 28.0f },
"crop", 0},
342 { { 28.0f },
"graduatednd", 0},
343 { { 28.0f },
"profile_gamma", 0},
345 { { 28.5f },
"channelmixerrgb", 0 },
346 { { 28.5f },
"diffuse", 0 },
347 { { 28.5f },
"censorize", 0 },
348 { { 28.5f },
"negadoctor", 0 },
349 { { 28.5f },
"blurs", 0 },
350 { { 29.0f },
"nlmeans", 0 },
352 { { 30.0f },
"colorchecker", 0 },
355 { { 31.0f },
"defringe", 0 },
357 { { 32.0f },
"atrous", 0 },
358 { { 33.0f },
"lowpass", 0 },
359 { { 34.0f },
"highpass", 0 },
360 { { 35.0f },
"sharpen", 0 },
361 { { 38.0f },
"colormapping", 0 },
362 { { 39.0f },
"channelmixer", 0 },
366 { { 40.0f },
"basicadj", 0 },
367 { { 41.0f },
"colorbalance", 0 },
368 { { 41.4f },
"splittoningrgb", 0 },
369 { { 41.45f },
"colorprimaries", 0 },
370 { { 41.5f },
"colorbalancergb", 0 },
371 { { 41.6f },
"colorequal", 0 },
372 { { 41.7f },
"drawlayer", 0 },
373 { { 42.0f },
"rgbcurve", 0 },
375 { { 43.0f },
"rgblevels", 0 },
376 { { 44.0f },
"basecurve", 0 },
378 { { 45.0f },
"filmic", 0 },
379 { { 45.5f },
"crystgrain", 0 },
380 { { 46.0f },
"filmicrgb", 0 },
381 { { 36.0f },
"lut3d", 0 },
382 { { 47.0f },
"colisa", 0 },
383 { { 48.0f },
"tonecurve", 0 },
384 { { 49.0f },
"levels", 0 },
385 { { 50.0f },
"shadhi", 0 },
386 { { 51.0f },
"zonesystem", 0 },
387 { { 52.0f },
"globaltonemap", 0 },
388 { { 53.0f },
"relight", 0 },
389 { { 54.0f },
"bilat", 0 },
391 { { 55.0f },
"colorcorrection", 0 },
394 { { 56.0f },
"colorcontrast", 0 },
395 { { 57.0f },
"velvia", 0 },
396 { { 58.0f },
"vibrance", 0 },
397 { { 60.0f },
"colorzones", 0 },
398 { { 61.0f },
"bloom", 0 },
399 { { 62.0f },
"colorize", 0 },
400 { { 63.0f },
"lowlight", 0 },
401 { { 64.0f },
"monochrome", 0 },
402 { { 65.0f },
"grain", 0 },
403 { { 66.0f },
"soften", 0 },
404 { { 67.0f },
"splittoning", 0 },
405 { { 68.0f },
"vignette", 0 },
406 { { 69.0f },
"colorreconstruct", 0 },
408 { { 70.0f },
"colorout", 0 },
409 { { 72.0f },
"finalscale", 0 },
410 { { 73.0f },
"overexposed", 0 },
411 { { 74.0f },
"rawoverexposed", 0 },
412 { { 75.0f },
"dither", 0 },
413 { { 76.0f },
"borders", 0 },
414 { { 77.0f },
"watermark", 0 },
415 { { 78.0f },
"gamma", 0 },
421 { { 0.5f},
"basebuffer", 0 },
422 { { 1.0f },
"rawprepare", 0 },
423 { { 2.0f },
"invert", 0 },
424 { { 2.5f },
"rawdenoiseai", 0 },
425 { { 3.0f },
"highlights", 0 },
426 { { 4.0f },
"cacorrect", 0 },
427 { { 5.0f },
"hotpixels", 0 },
428 { { 6.0f },
"rawdenoise", 0 },
429 { { 7.0f },
"demosaic", 0 },
432 { { 8.0f },
"colorin", 0 },
437 { { 9.0f },
"detailmask", 0 },
438 { { 10.0f },
"temperature", 0 },
439 { { 11.0f },
"denoiseprofile", 0},
440 { { 12.0f },
"bilateral", 0},
441 { { 13.0f },
"rotatepixels", 0},
442 { { 14.0f },
"scalepixels", 0},
443 { { 15.0f },
"lens", 0},
444 { { 16.0f },
"cacorrectrgb", 0},
446 { { 17.0f },
"hazeremoval", 0},
447 { { 18.0f },
"initialscale", 0 },
448 { { 19.0f },
"ashift", 0},
449 { { 20.0f },
"flip", 0},
450 { { 21.0f },
"clipping", 0},
451 { { 22.0f },
"liquify", 0},
452 { { 23.0f },
"spots", 0},
453 { { 24.0f },
"retouch", 0},
454 { { 25.0f },
"mask_manager", 0},
457 { { 26.0f },
"exposure", 0},
458 { { 27.0f },
"vignette", 0 },
459 { { 28.0f },
"graduatednd", 0},
460 { { 29.0f },
"toneequal", 0},
461 { { 30.0f },
"crop", 0},
462 { { 31.0f },
"profile_gamma", 0},
467 { { 32.0f },
"negadoctor", 0 },
468 { { 33.0f },
"channelmixerrgb", 0 },
469 { { 34.0f },
"channelmixer", 0 },
472 { { 35.0f },
"diffuse", 0 },
473 { { 36.0f },
"censorize", 0 },
474 { { 37.0f },
"blurs", 0 },
477 { { 38.0f },
"basicadj", 0 },
478 { { 39.0f },
"splittoningrgb", 0 },
479 { { 40.0f },
"colorprimaries", 0 },
480 { { 41.0f },
"colorbalance", 0 },
481 { { 42.0f },
"colorbalancergb", 0 },
482 { { 43.0f },
"colorequal", 0 },
483 { { 44.0f },
"drawlayer", 0 },
484 { { 45.0f },
"crystgrain", 0 },
487 { { 46.0f },
"finalscale", 0 },
489 { { 47.0f },
"tonemap", 0},
492 { { 48.0f },
"filmic", 0 },
493 { { 49.0f },
"filmicrgb", 0 },
494 { { 50.0f },
"basecurve", 0 },
500 { { 51.0f },
"nlmeans", 0 },
501 { { 52.0f },
"defringe", 0 },
502 { { 53.0f },
"bilat", 0 },
503 { { 54.0f },
"atrous", 0 },
504 { { 55.0f },
"lowpass", 0 },
505 { { 56.0f },
"highpass", 0 },
506 { { 57.0f },
"sharpen", 0 },
509 { { 58.0f },
"lut3d", 0 },
510 { { 59.0f },
"rgbcurve", 0 },
511 { { 60.0f },
"rgblevels", 0 },
512 { { 61.0f },
"splittoning", 0 },
515 { { 62.0f },
"colorchecker", 0 },
516 { { 63.0f },
"colormapping", 0 },
517 { { 64.0f },
"colorcorrection", 0 },
520 { { 65.0f },
"colorcontrast", 0 },
521 { { 66.0f },
"velvia", 0 },
522 { { 67.0f },
"vibrance", 0 },
523 { { 68.0f },
"colorzones", 0 },
526 { { 69.0f },
"colisa", 0 },
527 { { 70.0f },
"tonecurve", 0 },
528 { { 71.0f },
"levels", 0 },
529 { { 72.0f },
"shadhi", 0 },
530 { { 73.0f },
"zonesystem", 0 },
531 { { 74.0f },
"globaltonemap", 0 },
534 { { 75.0f },
"relight", 0 },
535 { { 76.0f },
"bloom", 0 },
536 { { 77.0f },
"colorize", 0 },
537 { { 78.0f },
"lowlight", 0 },
538 { { 79.0f },
"monochrome", 0 },
539 { { 80.0f },
"grain", 0 },
540 { { 81.0f },
"soften", 0 },
541 { { 82.0f },
"colorreconstruct", 0 },
545 { { 83.0f },
"colorout", 0 },
546 { { 84.0f },
"overexposed", 0 },
547 { { 85.0f },
"rawoverexposed", 0 },
551 { { 86.0f },
"borders", 0 },
552 { { 87.0f },
"watermark", 0 },
555 { { 88.0f },
"dither", 0 },
559 { { 89.0f },
"gamma", 0 },
567 { { 0.0f },
"basebuffer", 0 },
568 { { 1.0f },
"rawprepare", 0},
569 { { 2.0f },
"invert", 0},
570 { { 2.5f },
"rawdenoiseai", 0},
571 { { 3.0f },
"temperature", 0},
572 { { 4.0f },
"highlights", 0},
573 { { 5.0f },
"cacorrect", 0},
574 { { 6.0f },
"hotpixels", 0},
575 { { 7.0f },
"rawdenoise", 0},
576 { { 8.0f },
"demosaic", 0},
579 { { 9.0f },
"denoiseprofile", 0},
580 { {10.0f },
"bilateral", 0},
581 { {11.0f },
"rotatepixels", 0},
582 { {12.0f },
"scalepixels", 0},
583 { {13.0f },
"detailmask", 0},
584 { {14.0f },
"lens", 0},
585 { {15.0f },
"cacorrectrgb", 0},
587 { {16.0f },
"hazeremoval", 0},
589 { {17.0f },
"initialscale", 0},
590 { {18.0f },
"ashift", 0},
591 { {19.0f },
"flip", 0},
592 { {20.0f },
"clipping", 0},
593 { {21.0f },
"liquify", 0},
594 { {22.0f },
"spots", 0},
595 { {23.0f },
"retouch", 0},
598 { {24.0f },
"mask_manager", 0},
601 { {25.0f },
"exposure", 0},
602 { {26.0f },
"vignette", 0 },
603 { {27.0f },
"graduatednd", 0},
604 { {28.0f },
"toneequal", 0},
605 { {29.0f },
"crop", 0},
608 { {30.0f },
"profile_gamma", 0},
610 { {31.0f },
"colorin", 0},
615 { { 32.0f },
"negadoctor", 0 },
616 { { 33.0f },
"channelmixerrgb", 0 },
617 { { 34.0f },
"channelmixer", 0 },
620 { { 35.0f },
"diffuse", 0 },
621 { { 36.0f },
"censorize", 0 },
622 { { 37.0f },
"blurs", 0 },
625 { { 38.0f },
"basicadj", 0 },
626 { { 39.0f },
"splittoningrgb", 0 },
627 { { 40.0f },
"colorprimaries", 0 },
628 { { 41.0f },
"colorbalance", 0 },
629 { { 42.0f },
"colorbalancergb", 0 },
630 { { 43.0f },
"colorequal", 0 },
631 { { 44.0f },
"drawlayer", 0 },
632 { { 45.0f },
"crystgrain", 0 },
635 { { 46.0f },
"finalscale", 0 },
637 { { 47.0f },
"tonemap", 0},
640 { { 48.0f },
"filmic", 0 },
641 { { 49.0f },
"filmicrgb", 0 },
642 { { 50.0f },
"basecurve", 0 },
648 { { 51.0f },
"nlmeans", 0 },
649 { { 52.0f },
"defringe", 0 },
650 { { 53.0f },
"bilat", 0 },
651 { { 54.0f },
"atrous", 0 },
652 { { 55.0f },
"lowpass", 0 },
653 { { 56.0f },
"highpass", 0 },
654 { { 57.0f },
"sharpen", 0 },
657 { { 58.0f },
"lut3d", 0 },
658 { { 59.0f },
"rgbcurve", 0 },
659 { { 60.0f },
"rgblevels", 0 },
660 { { 61.0f },
"splittoning", 0 },
663 { { 62.0f },
"colorchecker", 0 },
664 { { 63.0f },
"colormapping", 0 },
665 { { 64.0f },
"colorcorrection", 0 },
668 { { 65.0f },
"colorcontrast", 0 },
669 { { 66.0f },
"velvia", 0 },
670 { { 67.0f },
"vibrance", 0 },
671 { { 68.0f },
"colorzones", 0 },
674 { { 69.0f },
"colisa", 0 },
675 { { 70.0f },
"tonecurve", 0 },
676 { { 71.0f },
"levels", 0 },
677 { { 72.0f },
"shadhi", 0 },
678 { { 73.0f },
"zonesystem", 0 },
679 { { 74.0f },
"globaltonemap", 0 },
682 { { 75.0f },
"relight", 0 },
683 { { 76.0f },
"bloom", 0 },
684 { { 77.0f },
"colorize", 0 },
685 { { 78.0f },
"lowlight", 0 },
686 { { 79.0f },
"monochrome", 0 },
687 { { 80.0f },
"grain", 0 },
688 { { 81.0f },
"soften", 0 },
689 { { 82.0f },
"colorreconstruct", 0 },
693 { { 83.0f },
"colorout", 0 },
694 { { 84.0f },
"overexposed", 0 },
695 { { 85.0f },
"rawoverexposed", 0 },
699 { { 86.0f },
"borders", 0 },
700 { { 87.0f },
"watermark", 0 },
703 { { 88.0f },
"dither", 0 },
707 { { 89.0f },
"gamma", 0 },
727static GList *
_insert_before(GList *iop_order_list,
const char *module,
const char *new_module)
729 gboolean exists =
FALSE;
732 for(
const GList *l = iop_order_list; l; l = g_list_next(l))
735 if(!strcmp(entry->operation, new_module))
745 for(GList *l = iop_order_list; l; l = g_list_next(l))
758 iop_order_list = g_list_insert_before(iop_order_list, l, new_entry);
764 return iop_order_list;
775 iop_order_list =
_insert_before(iop_order_list,
"nlmeans",
"negadoctor");
776 iop_order_list =
_insert_before(iop_order_list,
"negadoctor",
"channelmixerrgb");
777 iop_order_list =
_insert_before(iop_order_list,
"negadoctor",
"censorize");
778 iop_order_list =
_insert_before(iop_order_list,
"rgbcurve",
"colorbalancergb");
779 iop_order_list =
_insert_before(iop_order_list,
"colorbalancergb",
"colorprimaries");
780 iop_order_list =
_insert_before(iop_order_list,
"colorprimaries",
"splittoningrgb");
781 iop_order_list =
_insert_before(iop_order_list,
"rgbcurve",
"drawlayer");
782 iop_order_list =
_insert_before(iop_order_list,
"drawlayer",
"colorequal");
783 iop_order_list =
_insert_before(iop_order_list,
"ashift",
"cacorrectrgb");
784 iop_order_list =
_insert_before(iop_order_list,
"graduatednd",
"crop");
785 iop_order_list =
_insert_before(iop_order_list,
"colorbalance",
"diffuse");
786 iop_order_list =
_insert_before(iop_order_list,
"nlmeans",
"blurs");
787 iop_order_list =
_insert_before(iop_order_list,
"ashift",
"initialscale");
788 iop_order_list =
_insert_before(iop_order_list,
"filmicrgb",
"crystgrain");
789 iop_order_list =
_insert_before(iop_order_list,
"mask_manager",
"detailmask");
790 iop_order_list =
_insert_before(iop_order_list,
"rawprepare",
"basebuffer");
795 const char *first =
"demosaic";
796 for(
const GList *l = iop_order_list; l; l = g_list_next(l))
799 if(!strcmp(entry->operation,
"temperature") || !strcmp(entry->operation,
"demosaic"))
801 first = entry->operation;
805 iop_order_list =
_insert_before(iop_order_list, first,
"rawdenoiseai");
807 return iop_order_list;
816 int stored_version = 0;
817 const gboolean has_stored_order
819 if(has_stored_order) iop_order_version = stored_version;
831 return iop_order_version;
841 { .
op_prev =
"basebuffer", .op_next =
"rawprepare" },
842 { .op_prev =
"rawprepare", .op_next =
"invert" },
843 { .op_prev =
"invert", .op_next =
"temperature" },
844 { .op_prev =
"highlights", .op_next =
"cacorrect" },
845 { .op_prev =
"cacorrect", .op_next =
"hotpixels" },
846 { .op_prev =
"hotpixels", .op_next =
"rawdenoise" },
847 { .op_prev =
"rawdenoise", .op_next =
"demosaic" },
848 { .op_prev =
"invert", .op_next =
"rawdenoiseai"},
849 { .op_prev =
"rawdenoiseai",.op_next =
"temperature" },
850 { .op_prev =
"rawdenoiseai",.op_next =
"demosaic" },
851 { .op_prev =
"demosaic", .op_next =
"colorin" },
852 { .op_prev =
"colorin", .op_next =
"colorout" },
853 { .op_prev =
"colorout", .op_next =
"gamma" },
854 { .op_prev =
"flip", .op_next =
"crop" },
855 { .op_prev =
"flip", .op_next =
"clipping" },
856 { .op_prev =
"ashift", .op_next =
"clipping" },
857 { .op_prev =
"colorin", .op_next =
"channelmixerrgb"},
861 while(rule_entry[
i].op_prev[0])
868 rules = g_list_prepend(rules, rule);
872 return g_list_reverse(rules);
879 for(GList *iops_order = iop_order_list; iops_order; iops_order = g_list_next(iops_order))
883 if(strcmp(order_entry->
operation, op_name) == 0
884 && (order_entry->
instance == multi_priority || multi_priority == -1))
903 const int multi_priority)
915 int iop_order = INT_MAX;
921 iop_order = order_entry->o.iop_order;
924 fprintf(stderr,
"[iop_order] %s instance %d is missing from the saved pipeline order; "
925 "its position will be sanitized to the default order\n", op_name, multi_priority);
934 if(am->o.iop_order > bm->o.iop_order)
return 1;
935 if(am->o.iop_order < bm->o.iop_order)
return -1;
943 if(am->o.iop_order_f > bm->o.iop_order_f)
return 1;
944 if(am->o.iop_order_f < bm->o.iop_order_f)
return -1;
958 GList *l = iop_order_list;
968 if(strcmp(order[
k].operation, entry->operation))
985 if(ok && order[
k].operation[0] ==
'\0')
return version;
993 GList *l = iop_order_list;
997 GList *next = g_list_next(l);
1049 GList *iop_order_list = NULL;
1058 iop_order_list = g_list_prepend(iop_order_list, entry);
1063 return g_list_reverse(iop_order_list);
1068 GList *iop_order_list = NULL;
1092 return iop_order_list;
1102 GList *iop_order_list = NULL;
1119 const char *buf =
row.iop_list;
1125 fprintf(stderr,
"[dt_ioppr_get_iop_order_list] error building iop_order_list imgid %d\n", imgid);
1153 fprintf(stderr,
"[dt_ioppr_get_iop_order_list] invalid iop order version %d for imgid %d\n", version, imgid);
1162 iop_order_list = NULL;
1163 fprintf(stderr,
"[dt_ioppr_get_iop_order_list] sanity check failed for imgid %d, falling back to default\n", imgid);
1192 return iop_order_list;
1207 for(
const GList *l = iop_order_list; l; l = g_list_next(l))
1228 GList *next = g_list_next(l);
1255 GList *modules = dev->
iop;
1259 GList *next = g_list_next(modules);
1282 GList *new_iop_order_list = NULL;
1285 for(
const GList *l = ordered_modules; l; l = g_list_next(l))
1295 new_iop_order_list = g_list_append(new_iop_order_list, entry);
1298 if(new_iop_order_list)
1316 GList *iop_order_list = NULL;
1385 for(
const GList *l = iop_order_list; l; l = g_list_next(l))
1392 mi = g_list_prepend(mi,
copy);
1396 return g_list_reverse(mi);
1410 const char *operation, GList *multi_instance_list)
1416 GList *link = iop_order_list;
1418 for(
const GList *l = multi_instance_list; l; l = g_list_next(l))
1424 if(item_nb <= count_to)
1434 link = g_list_next(link);
1438 iop_order_list = g_list_insert_before(iop_order_list, link, entry);
1448 GList *next = g_list_next(link);
1449 if(strcmp(operation, entry->operation) == 0)
1452 iop_order_list = g_list_delete_link(iop_order_list, link);
1459 return iop_order_list;
1482 GList *l_next = g_list_next(l);
1484 op = g_list_append(op, entry);
1486 copy = g_list_delete_link(
copy, l);
1491 GList *next = g_list_next(mi);
1495 op = g_list_append(op, mi_entry);
1496 copy = g_list_delete_link(
copy, mi);
1514 return iop_order_list;
1527static void _count_iop_module(GList *iop,
const char *operation,
int *max_multi_priority,
int *count,
1528 int *max_multi_priority_enabled,
int *count_enabled)
1530 *max_multi_priority = 0;
1532 *max_multi_priority_enabled = 0;
1535 for(
const GList *modules = iop; modules; modules = g_list_next(modules))
1538 if(!strcmp(mod->op, operation))
1541 if(*max_multi_priority < mod->multi_priority) *max_multi_priority = mod->multi_priority;
1546 if(*max_multi_priority_enabled < mod->multi_priority) *max_multi_priority_enabled = mod->multi_priority;
1551 assert(*count >= *count_enabled);
1565 for(
const GList *l = e_list; l; l = g_list_next(l))
1568 if(!strcmp(ep->
operation, operation)) count++;
1583 for(
const GList *l = g_list_previous(e_list); l; l = g_list_previous(l))
1586 if(!strcmp(ep->operation, operation))
return TRUE;
1603 for(
const GList *l = dev->
iop; l; l = g_list_next(l))
1606 if((!only_disabled || mod->enabled ==
FALSE) && !strcmp(mod->op, operation))
1609 if(count ==
n)
return mod->multi_priority;
1629 for(GList *e_list = entry_list; e_list; e_list = g_list_next(e_list))
1633 gboolean force_append =
FALSE;
1640 force_append =
TRUE;
1642 int max_multi_priority = 0, count = 0;
1643 int max_multi_priority_enabled = 0, count_enabled = 0;
1647 &max_multi_priority, &count, &max_multi_priority_enabled, &count_enabled);
1651 for(GList *l = g_list_last(dev->
iop_order_list); l; l = g_list_previous(l))
1660 int start_multi_priority = 0;
1663 if(append || force_append)
1665 nb_replace = count - count_enabled;
1666 add_count =
MAX(0, new_active_instances - nb_replace);
1667 start_multi_priority = max_multi_priority + 1;
1672 add_count =
MAX(0, new_active_instances - count);
1673 start_multi_priority = max_multi_priority + 1;
1677 int multi_priority = start_multi_priority;
1680 for(
const GList *s = entry_list; s; s = g_list_next(s))
1683 if(!strcmp(item->
operation, e->operation))
1686 if(nb <= nb_replace)
1699 multi_priority = start_multi_priority;
1703 for(
int k = 0;
k<add_count;
k++)
1706 g_strlcpy(
n->operation, ep->operation,
sizeof(
n->operation));
1707 n->instance = multi_priority++;
1723 GList *e_list = NULL;
1726 for(
const GList *si_list = st_items; si_list; si_list = g_list_next(si_list))
1731 memcpy(
n->operation, si->operation,
sizeof(
n->operation));
1732 n->instance = si->multi_priority;
1733 g_strlcpy(
n->name, si->multi_name,
sizeof(
n->name));
1735 e_list = g_list_prepend(e_list,
n);
1737 e_list = g_list_reverse(e_list);
1744 for(
const GList *si_list = st_items; si_list; si_list = g_list_next(si_list))
1751 el = g_list_next(el);
1754 g_list_free(e_list);
1760 GList *e_list = NULL;
1763 for(
const GList *m_list = modules; m_list; m_list = g_list_next(m_list))
1768 g_strlcpy(
n->operation, mod->op,
sizeof(
n->operation));
1769 n->instance = mod->multi_priority;
1770 g_strlcpy(
n->name, mod->multi_name,
sizeof(
n->name));
1772 e_list = g_list_prepend(e_list,
n);
1774 e_list = g_list_reverse(e_list);
1781 for(
const GList *m_list = modules; m_list; m_list = g_list_next(m_list))
1789 el = g_list_next(el);
1808 for(
const GList *history = history_list; history; history = g_list_next(history))
1812 if(hist->module == mod)
1835 GList *iop_list = *_iop_list;
1839 GList *modules = iop_list;
1843 modules = g_list_next(modules);
1860 GList *modules1 = g_list_next(modules);
1883 GList *modules1 = g_list_previous(modules);
1884 if(modules1) modules1 = g_list_previous(modules1);
1896 "[dt_ioppr_check_duplicate_iop_order 1] modules %s %s(%d) and %s %s(%d) have the same iop_order\n",
1909 "[dt_ioppr_check_duplicate_iop_order] modules %s %s(%d) and %s %s(%d) have the same iop_order\n",
1920 modules = g_list_next(modules);
1926 modules = g_list_next(modules);
1930 *_iop_list = iop_list;
1936 int iop_order_missing = 0;
1939 for(
const GList *modules = iop_list; modules; modules = g_list_next(modules))
1946 iop_order_missing = 1;
1947 fprintf(stderr,
"[dt_ioppr_check_so_iop_order] missing iop_order for module %s\n", mod->op);
1951 return iop_order_missing;
1966 return (
void *)new_entry;
1980 if(am->iop_order > bm->iop_order)
return 1;
1981 if(am->iop_order < bm->iop_order)
return -1;
1995 gboolean can_move =
FALSE;
2002 GList *modules = iop_list;
2003 for(; modules; modules = g_list_next(modules))
2006 if(mod == module)
break;
2017 for(modules = g_list_next(modules); modules; modules = g_list_next(modules))
2022 if(mod == module_next)
2038 if(strcmp(module->
op, rule->op_prev) == 0 && strcmp(mod->
op, rule->op_next) == 0)
2044 if(rule_found)
break;
2059 fprintf(stderr,
"[dt_ioppr_get_iop_order_before_iop] %s %s(%d) and %s %s(%d) have the same iop_order\n",
2069 fprintf(stderr,
"[dt_ioppr_get_iop_order_before_iop] can't find module %s %s\n", module->
op, module->
multi_name);
2076 GList *modules = g_list_last(iop_list);
2077 for(; modules; modules = g_list_previous(modules))
2080 if(mod == module)
break;
2091 for(modules = g_list_previous(modules); modules; modules = g_list_previous(modules))
2112 if(strcmp(mod->
op, rule->op_prev) == 0 && strcmp(module->
op, rule->op_next) == 0)
2118 if(rule_found)
break;
2120 if(mod == module_next) mod2 = mod;
2133 fprintf(stderr,
"[dt_ioppr_get_iop_order_before_iop] %s %s(%d) and %s %s(%d) have the same iop_order\n",
2143 fprintf(stderr,
"[dt_ioppr_get_iop_order_before_iop] can't find module %s %s\n", module->
op, module->
multi_name);
2147 fprintf(stderr,
"[dt_ioppr_get_iop_order_before_iop] modules %s %s(%d) and %s %s(%d) have the same iop_order\n",
2164 gboolean can_move =
FALSE;
2169 for(
const GList *modules = g_list_last(iop_list); modules; modules = g_list_previous(modules))
2172 if(mod == module_prev)
break;
2180 "[dt_ioppr_get_iop_order_after_iop] can't find module previous to %s %s(%d) while moving %s %s(%d) after it\n",
2205 entry->
instance =
module->multi_priority;
2207 current = g_list_alloc();
2208 current->data = entry;
2214 g_list_free(current);
2237 entry->
instance =
module->multi_priority;
2239 current = g_list_alloc();
2240 current->data = entry;
2246 GList *next = g_list_next(prev);
2252 g_list_free(current);
2272 for(
const GList *modules = iop_list; modules; modules = g_list_next(modules))
2275 if(mod->iop_order == INT_MAX)
2286 if(strcmp(mod->op, rule->op_prev) == 0)
2289 for(
const GList *modules_prev = g_list_previous(modules);
2291 modules_prev = g_list_previous(modules_prev))
2295 if(strcmp(mod_prev->op, rule->op_next) == 0)
2297 fprintf(stderr,
"[_ioppr_check_rules] found rule %s %s module %s %s(%d) is after %s %s(%d) image %i (%s)\n",
2298 rule->op_prev, rule->op_next, mod->op, mod->multi_name, mod->iop_order, mod_prev->op,
2299 mod_prev->multi_name, mod_prev->iop_order, imgid, msg);
2304 else if(strcmp(mod->op, rule->op_next) == 0)
2307 for(
const GList *modules_next = g_list_next(modules); modules_next; modules_next = g_list_next(modules_next))
2311 if(strcmp(mod_next->op, rule->op_prev) == 0)
2313 fprintf(stderr,
"[_ioppr_check_rules] found rule %s %s module %s %s(%d) is before %s %s(%d) image %i (%s)\n",
2314 rule->op_prev, rule->op_next, mod->op, mod->multi_name, mod->iop_order, mod_next->op,
2315 mod_next->multi_name, mod_next->iop_order, imgid, msg);
2325 const char *operation =
module->op;
2326 const int32_t instance =
module->multi_priority;
2334 GList *place = NULL;
2336 int max_instance = -1;
2341 if(!strcmp(e->operation, operation) && e->instance > max_instance)
2344 max_instance = e->instance;
2353 int iop_order_ok = 1;
2358 for(modules = g_list_last(dev->
iop); modules; modules = g_list_previous(dev->
iop))
2361 if(mod->iop_order != INT_MAX)
2368 if(strcmp(mod->op,
"gamma") != 0)
2371 fprintf(stderr,
"[dt_ioppr_check_iop_order] gamma is not the last iop, last is %s %s(%d) image %i (%s)\n",
2372 mod->op, mod->multi_name, mod->iop_order,imgid, msg);
2383 for(
const GList *modules = g_list_last(dev->
iop); modules; modules = g_list_previous(dev->
iop))
2386 if(!mod->default_enabled && mod->iop_order != INT_MAX)
2391 fprintf(stderr,
"[dt_ioppr_check_iop_order] module not used but enabled!! %s %s(%d) image %i (%s)\n",
2392 mod->op, mod->multi_name, mod->iop_order,imgid, msg);
2394 if(mod->multi_priority == 0)
2397 fprintf(stderr,
"[dt_ioppr_check_iop_order] base module set as not used %s %s(%d) image %i (%s)\n",
2398 mod->op, mod->multi_name, mod->iop_order,imgid, msg);
2407 for(
const GList *modules = g_list_first(dev->
iop); modules; modules = g_list_next(modules))
2418 "[dt_ioppr_check_iop_order] module %s %s(%d) should be after %s %s(%d) image %i (%s)\n",
2427 "[dt_ioppr_check_iop_order] module %s %s(%i)(%d) and %s %s(%i)(%d) have the same order image %i (%s)\n",
2439 for(
const GList *history = dev->
history; history; history = g_list_next(history))
2443 if(hist->iop_order == INT_MAX)
2448 fprintf(stderr,
"[dt_ioppr_check_iop_order] history module not used but enabled!! %s %s(%d) image %i (%s)\n",
2449 hist->op_name, hist->multi_name, hist->iop_order, imgid, msg);
2451 if(hist->multi_priority == 0)
2454 fprintf(stderr,
"[dt_ioppr_check_iop_order] history base module set as not used %s %s(%d) image %i (%s)\n",
2455 hist->op_name, hist->multi_name, hist->iop_order, imgid, msg);
2462 return iop_order_ok;
2467 g_return_val_if_fail(!
IS_NULL_PTR(iop_order_list), NULL);
2472 for(
const GList *l = iop_order_list; l; l = g_list_next(l))
2475 *
size += strlen(entry->operation) +
sizeof(int32_t) * 2;
2482 char *params = (
char *)malloc(*
size);
2487 for(
const GList *l = iop_order_list; l; l = g_list_next(l))
2491 const int32_t len = strlen(entry->operation);
2492 memcpy(params+pos, &len,
sizeof(int32_t));
2493 pos +=
sizeof(int32_t);
2496 memcpy(params+pos, entry->operation, len);
2500 memcpy(params+pos, &(entry->instance),
sizeof(int32_t));
2501 pos +=
sizeof(int32_t);
2509 GString *text = g_string_new(
"");
2511 const GList *
const last = g_list_last(iop_order_list);
2512 for(
const GList *l = iop_order_list; l; l = g_list_next(l))
2516 snprintf(buf,
sizeof(buf),
"%s,%d%s", entry->operation, entry->instance, (l == last) ?
"" :
",");
2517 g_string_append(text, buf);
2520 return g_string_free(text,
FALSE);
2547 GList *first = g_list_first(list);
2550 ok = ok && (g_strcmp0(entry_first->
operation,
"basebuffer") == 0);
2554 GList *last = g_list_last(list);
2557 ok = ok && (g_strcmp0(entry_last->
operation,
"gamma") == 0);
2564 GList *iop_order_list = NULL;
2567 for(GList *l = list; l; l = g_list_next(l))
2579 const char *data = (
char *)l->data;
2581 sscanf(data,
"%d", &inst);
2585 iop_order_list = g_list_prepend(iop_order_list, entry);
2587 iop_order_list = g_list_reverse(iop_order_list);
2596 return iop_order_list;
2602 iop_order_list = NULL;
2608 GList *iop_order_list = NULL;
2618 const int32_t len = *(int32_t *)buf;
2619 buf +=
sizeof(int32_t);
2621 if(len < 0 || len > 20) {
dt_free(entry);
goto error; }
2630 buf +=
sizeof(int32_t);
2635 iop_order_list = g_list_prepend(iop_order_list, entry);
2637 size -= (2 *
sizeof(int32_t) + len);
2639 iop_order_list = g_list_reverse(iop_order_list);
2643 return iop_order_list;
2647 iop_order_list = NULL;
2651#undef DT_IOP_ORDER_INFO
static void error(char *msg)
static const dt_adaptation_t kind
gboolean dt_image_needs_rawprepare(const dt_image_t *img)
struct dt_develop_t * dt_dev_get_global(void)
GList * dt_ioppr_get_iop_order_rules_global(void)
int dt_deprecated(const char *op)
Modules without a proper IOP order should throw errors and log, except if they are deprecated definit...
void dt_dev_write_history(dt_develop_t *dev, gboolean async)
Thread-safe wrapper around dt_dev_write_history_ext() for dev->image_storage.id.
void dt_dev_history_pixelpipe_update(dt_develop_t *dev, gboolean rebuild)
Rebuild or resync pixelpipes after backend history changes.
void dt_dev_history_notify_change(dt_develop_t *dev, const int32_t imgid)
Notify the rest of the app that history changes were written.
gboolean dt_dev_reload_history_items(dt_develop_t *dev, const int32_t imgid)
Reload history from DB and rebuild pipelines/GUI state.
void dt_dev_history_gui_update(struct dt_develop_t *dev)
Apply history-loaded params to module GUIs.
static gboolean g_list_shorter_than(const GList *list, unsigned len)
gboolean dt_history_repository_get_module_order(const int32_t imgid, dt_module_order_row_t *row)
Read imgid's row. FALSE when there is none, and row is then left zeroed.
void dt_module_order_row_cleanup(dt_module_order_row_t *row)
Release what dt_history_repository_get_module_order() allocated.
gboolean dt_history_repository_set_module_order(const int32_t imgid, const int version, const char *iop_list)
Store imgid's order: version, and iop_list serialized or NULL.
gboolean dt_history_repository_has_custom_module_order(const int32_t imgid)
Whether imgid's row stores a serialized list, i.e. iop_list IS NOT NULL.
gboolean dt_history_repository_get_module_order_version(const int32_t imgid, int *version)
imgid's stored order version.
gboolean dt_history_repository_has_module_order(const int32_t imgid)
Whether imgid has a main.module_order row at all, whatever it says.
dt_image_t * dt_image_cache_testget(const int32_t imgid, char mode)
gboolean dt_image_cache_is_ready(void)
Has the image cache been initialised? Callers that run before dt_image_cache_init() or after its clea...
void dt_image_cache_read_release(const dt_image_t *img)
dt_iop_module_t * dt_iop_get_module_by_instance_name(GList *modules, const char *operation, const char *multi_name)
dt_iop_module_t * dt_iop_get_module_by_op_priority(GList *modules, const char *operation, const int multi_priority)
const dt_iop_order_entry_t ansel_raw_order[]
static void dt_ioppr_check_duplicate_iop_order(GList **_iop_list, GList *history_list)
Detect and resolve duplicate iop_order values.
static GList * dt_ioppr_extract_multi_instances_list(GList *iop_order_list)
Extract all order entries that have multiple instances.
const dt_iop_order_entry_t v30_order[]
static void _ioppr_check_rules(GList *iop_list, const int32_t imgid, const char *msg)
Validate pipeline order against fence and rule constraints.
GList * dt_ioppr_get_iop_order_list(int32_t imgid, gboolean sorted)
Load the order list for an image from the DB.
gboolean dt_ioppr_has_multiple_instances(GList *iop_order_list)
Detect whether multiple instances are grouped for a non-custom order.
gboolean dt_ioppr_has_iop_order_list(int32_t imgid)
Check whether the image has an explicit order list stored in DB.
static gboolean _ioppr_sanity_check_iop_order(GList *list)
Basic sanity check for an order list.
GList * dt_ioppr_merge_module_multi_instance_iop_order_list(GList *iop_order_list, const char *operation, GList *multi_instance_list)
Merge an operation's multiple instances into the order list.
void * dt_ioppr_serialize_iop_order_list(GList *iop_order_list, size_t *size)
Serialize an order list into a binary blob (used for presets).
GList * dt_ioppr_get_iop_order_list_version(dt_iop_order_t version)
Return the built-in order list for a given version.
gint dt_sort_iop_list_by_order_f(gconstpointer a, gconstpointer b)
Compare two list nodes holding modules by iop_order.
static void * _dup_iop_order_entry(const void *src, gpointer data)
Deep-copy callback for dt_iop_order_entry_t.
gint dt_sort_iop_by_order(gconstpointer a, gconstpointer b)
Compare two module instances by iop_order for sorting.
static void _ioppr_reset_iop_order(GList *iop_order_list)
Reset iop_order values to a sequential order for a list.
GList * dt_ioppr_get_iop_order_rules()
Return the list of ordering rules (prev/next constraints).
static void dt_ioppr_migrate_iop_order(struct dt_develop_t *dev, const int32_t imgid)
Apply a new order list by reloading history and rebuilding UI/pipelines.
static dt_dev_history_item_t * _ioppr_search_history_by_module(GList *history_list, dt_iop_module_t *mod)
Find a history item referencing a given module instance.
static int _count_entries_operation(GList *e_list, const char *operation)
Count order-list entries matching an operation name.
static GList * _insert_before(GList *iop_order_list, const char *module, const char *new_module)
Insert a missing module entry before another module in an order list.
void dt_ioppr_rebuild_iop_order_from_modules(struct dt_develop_t *dev, GList *ordered_modules)
Rebuild dev->iop_order_list from a list of ordered modules.
gint dt_sort_iop_list_by_order(gconstpointer a, gconstpointer b)
GList * _table_to_list(const dt_iop_order_entry_t entries[])
Build an order list from a static entry table.
gboolean dt_ioppr_check_can_move_before_iop(GList *iop_list, dt_iop_module_t *module, dt_iop_module_t *module_next)
Validate whether module can be moved before module_next.
gboolean dt_ioppr_check_can_move_after_iop(GList *iop_list, dt_iop_module_t *module, dt_iop_module_t *module_prev)
Validate whether module can be moved after module_prev.
gboolean dt_ioppr_move_iop_after(struct dt_develop_t *dev, dt_iop_module_t *module, dt_iop_module_t *module_prev)
Move a module instance after another module in the pipe.
static GList * dt_ioppr_merge_multi_instance_iop_order_list(GList *iop_order_list, GList *multi_instance_list)
Merge multiple-instance entries into an order list.
const dt_iop_order_entry_t ansel_jpg_order[]
static gboolean dt_ioppr_write_iop_order(const dt_iop_order_t kind, GList *iop_order_list, const int32_t imgid)
Persist an order list for a given image with a specific kind.
GList * dt_ioppr_iop_order_copy_deep(GList *iop_order_list)
Deep-copy an order list.
gboolean dt_ioppr_write_iop_order_list(GList *iop_order_list, const int32_t imgid)
Persist an order list to the DB for a given image.
void dt_ioppr_resync_modules_order(dt_develop_t *dev)
Update dev->iop module order values from dev->iop_order_list.
int dt_ioppr_get_iop_order(GList *iop_order_list, const char *op_name, const int multi_priority)
Return the iop_order for a given operation/instance pair.
int _get_multi_priority(dt_develop_t *dev, const char *operation, const int n, const gboolean only_disabled)
Return the multi_priority of the n-th instance of an operation.
int dt_ioppr_check_so_iop_order(GList *iop_list, GList *iop_order_list)
Check whether any module .so is missing an iop_order entry.
const dt_iop_order_entry_t legacy_order[]
static const dt_iop_order_entry_t * orders[5]
const char * iop_order_string[]
gboolean dt_ioppr_move_iop_before(struct dt_develop_t *dev, dt_iop_module_t *module, dt_iop_module_t *module_next)
Move a module instance before another module in the pipe.
dt_iop_order_t dt_ioppr_get_iop_order_list_kind(GList *iop_order_list)
Determine the kind of an order list by inspecting its content.
void dt_ioppr_update_for_style_items(dt_develop_t *dev, GList *st_items, gboolean append)
Update dev->iop_order_list with modules referenced by style items.
void dt_ioppr_set_default_iop_order(dt_develop_t *dev, const int32_t imgid)
Set dev->iop_order_list to the default order for a given image.
void dt_ioppr_resync_pipeline(dt_develop_t *dev, const int32_t imgid, const char *msg, gboolean check_duplicates)
Resynchronize pipeline order and related structures.
char * dt_ioppr_serialize_text_iop_order_list(GList *iop_order_list)
Serialize an order list to a text representation.
const dt_iop_order_entry_t v30_jpg_order[]
GList * dt_ioppr_deserialize_text_iop_order_list(const char *buf)
Deserialize an order list from a text representation.
void dt_ioppr_insert_module_instance(struct dt_develop_t *dev, dt_iop_module_t *module)
Ensure a module instance has an entry in dev->iop_order_list.
GList * dt_ioppr_insert_missing_modules(GList *iop_order_list)
Insert modules that postdate a deserialized/custom order list.
const char * dt_iop_order_string(const dt_iop_order_t order)
Return the human-readable name for an IOP order enum value.
void dt_ioppr_update_for_modules(dt_develop_t *dev, GList *modules, gboolean append)
Update dev->iop_order_list with modules from a module list.
static dt_iop_order_entry_t * dt_ioppr_get_iop_order_entry(GList *iop_order_list, const char *op_name, const int multi_priority)
Return the first order entry matching operation/instance.
static gboolean _operation_already_handled(GList *e_list, const char *operation)
Check if an operation was already handled earlier in the list.
dt_iop_order_t dt_ioppr_get_iop_order_version(const int32_t imgid)
Fetch the IOP order version stored for an image.
static void dt_ioppr_resync_iop_list(dt_develop_t *dev)
Resynchronize dev->iop list order against dev->iop_order_list.
GList * dt_ioppr_deserialize_iop_order_list(const char *buf, size_t size)
Deserialize an order list from a binary blob.
int dt_ioppr_check_iop_order(dt_develop_t *dev, const int32_t imgid, const char *msg)
Debug helper to validate the current order for a develop context.
static void _count_iop_module(GList *iop, const char *operation, int *max_multi_priority, int *count, int *max_multi_priority_enabled, int *count_enabled)
Count module instances and track their highest priorities.
static void dt_ioppr_update_for_entries(dt_develop_t *dev, GList *entry_list, gboolean append)
Update dev->iop_order_list to include entries from entry_list.
void dt_ioppr_change_iop_order(struct dt_develop_t *dev, const int32_t imgid, GList *new_iop_list)
Replace the current order list with a new one and persist it.
GList * dt_ioppr_get_iop_order_link(GList *iop_order_list, const char *op_name, const int multi_priority)
Find a list link matching an operation and instance.
void dt_print(dt_debug_thread_t thread, const char *msg,...) __attribute__((format(printf
Print to stdout when thread is enabled, prefixed with seconds since startup.
float *const restrict const size_t k
#define IS_NULL_PTR(p)
C is way too permissive with !=, == and if(var) checks, which can mean too many things depending on w...
static void dt_free_gpointer(gpointer ptr)
g_free() one pointer, with the signature GDestroyNotify wants.
#define dt_free(ptr)
g_free() ptr and set it to NULL, skipping both if it is already NULL.
void copy(TYPE *dest, TYPE *source, size_t num_el)
Copy a flat buffer used to initialize test matrices.
struct dt_iop_module_t::@23::@24 source
struct dt_iop_module_t::@23::@25 sink
struct dt_iop_module_t::@23 raster_mask
union dt_iop_order_entry_t::@26 o
One main.module_order row.
GList * dt_util_str_to_glist(const gchar *separator, const gchar *text)