Blender  V3.3
sequencer_scopes.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2006-2008 Peter Schlaile < peter [at] schlaile [dot] de >. */
3 
8 #include <math.h>
9 #include <string.h>
10 
11 #include "BLI_task.h"
12 #include "BLI_utildefines.h"
13 
14 #include "IMB_colormanagement.h"
15 #include "IMB_imbuf.h"
16 #include "IMB_imbuf_types.h"
17 
18 #include "sequencer_intern.h"
19 
20 /* XXX(campbell): why is this function better than BLI_math version?
21  * only difference is it does some normalize after, need to double check on this. */
22 static void rgb_to_yuv_normalized(const float rgb[3], float yuv[3])
23 {
24  yuv[0] = 0.299f * rgb[0] + 0.587f * rgb[1] + 0.114f * rgb[2];
25  yuv[1] = 0.492f * (rgb[2] - yuv[0]);
26  yuv[2] = 0.877f * (rgb[0] - yuv[0]);
27 
28  /* Normalize. */
29  yuv[1] *= 255.0f / (122 * 2.0f);
30  yuv[1] += 0.5f;
31 
32  yuv[2] *= 255.0f / (157 * 2.0f);
33  yuv[2] += 0.5f;
34 }
35 
36 static void scope_put_pixel(const uchar *table, uchar *pos)
37 {
38  uchar newval = table[*pos];
39  pos[0] = pos[1] = pos[2] = newval;
40  pos[3] = 255;
41 }
42 
43 static void scope_put_pixel_single(const uchar *table, uchar *pos, int col)
44 {
45  char newval = table[pos[col]];
46  pos[col] = newval;
47  pos[3] = 255;
48 }
49 
50 static void wform_put_line(int w, uchar *last_pos, uchar *new_pos)
51 {
52  if (last_pos > new_pos) {
53  uchar *temp = new_pos;
54  new_pos = last_pos;
55  last_pos = temp;
56  }
57 
58  while (last_pos < new_pos) {
59  if (last_pos[0] == 0) {
60  last_pos[0] = last_pos[1] = last_pos[2] = 32;
61  last_pos[3] = 255;
62  }
63  last_pos += 4 * w;
64  }
65 }
66 
67 static void wform_put_line_single(int w, uchar *last_pos, uchar *new_pos, int col)
68 {
69  if (last_pos > new_pos) {
70  uchar *temp = new_pos;
71  new_pos = last_pos;
72  last_pos = temp;
73  }
74 
75  while (last_pos < new_pos) {
76  if (last_pos[col] == 0) {
77  last_pos[col] = 32;
78  last_pos[3] = 255;
79  }
80  last_pos += 4 * w;
81  }
82 }
83 
84 static void wform_put_border(uchar *tgt, int w, int h)
85 {
86  int x, y;
87 
88  for (x = 0; x < w; x++) {
89  uchar *p = tgt + 4 * x;
90  p[1] = p[3] = 155;
91  p[4 * w + 1] = p[4 * w + 3] = 155;
92  p = tgt + 4 * (w * (h - 1) + x);
93  p[1] = p[3] = 155;
94  p[-4 * w + 1] = p[-4 * w + 3] = 155;
95  }
96 
97  for (y = 0; y < h; y++) {
98  uchar *p = tgt + 4 * w * y;
99  p[1] = p[3] = 155;
100  p[4 + 1] = p[4 + 3] = 155;
101  p = tgt + 4 * (w * y + w - 1);
102  p[1] = p[3] = 155;
103  p[-4 + 1] = p[-4 + 3] = 155;
104  }
105 }
106 
107 static void wform_put_gridrow(uchar *tgt, float perc, int w, int h)
108 {
109  tgt += (int)(perc / 100.0f * h) * w * 4;
110 
111  for (int i = 0; i < w * 2; i++) {
112  tgt[0] = 255;
113 
114  tgt += 4;
115  }
116 }
117 
118 static void wform_put_grid(uchar *tgt, int w, int h)
119 {
120  wform_put_gridrow(tgt, 90.0, w, h);
121  wform_put_gridrow(tgt, 70.0, w, h);
122  wform_put_gridrow(tgt, 10.0, w, h);
123 }
124 
126 {
127  ImBuf *rval = IMB_allocImBuf(ibuf->x + 3, 515, 32, IB_rect);
128  int x, y;
129  const uchar *src = (uchar *)ibuf->rect;
130  uchar *tgt = (uchar *)rval->rect;
131  int w = ibuf->x + 3;
132  int h = 515;
133  float waveform_gamma = 0.2;
134  uchar wtable[256];
135 
136  wform_put_grid(tgt, w, h);
137  wform_put_border(tgt, w, h);
138 
139  for (x = 0; x < 256; x++) {
140  wtable[x] = (uchar)(pow(((float)x + 1) / 256, waveform_gamma) * 255);
141  }
142 
143  for (y = 0; y < ibuf->y; y++) {
144  uchar *last_p = NULL;
145 
146  for (x = 0; x < ibuf->x; x++) {
147  const uchar *rgb = src + 4 * (ibuf->x * y + x);
149  uchar *p = tgt;
150  p += 4 * (w * ((int)(v * (h - 3)) + 1) + x + 1);
151 
152  scope_put_pixel(wtable, p);
153  p += 4 * w;
154  scope_put_pixel(wtable, p);
155 
156  if (last_p != NULL) {
157  wform_put_line(w, last_p, p);
158  }
159  last_p = p;
160  }
161  }
162 
163  return rval;
164 }
165 
167 {
168  ImBuf *rval = IMB_allocImBuf(ibuf->x + 3, 515, 32, IB_rect);
169  int x, y;
170  const float *src = ibuf->rect_float;
171  uchar *tgt = (uchar *)rval->rect;
172  int w = ibuf->x + 3;
173  int h = 515;
174  float waveform_gamma = 0.2;
175  uchar wtable[256];
176 
177  wform_put_grid(tgt, w, h);
178 
179  for (x = 0; x < 256; x++) {
180  wtable[x] = (uchar)(pow(((float)x + 1) / 256, waveform_gamma) * 255);
181  }
182 
183  for (y = 0; y < ibuf->y; y++) {
184  uchar *last_p = NULL;
185 
186  for (x = 0; x < ibuf->x; x++) {
187  const float *rgb = src + 4 * (ibuf->x * y + x);
189  uchar *p = tgt;
190 
191  CLAMP(v, 0.0f, 1.0f);
192 
193  p += 4 * (w * ((int)(v * (h - 3)) + 1) + x + 1);
194 
195  scope_put_pixel(wtable, p);
196  p += 4 * w;
197  scope_put_pixel(wtable, p);
198 
199  if (last_p != NULL) {
200  wform_put_line(w, last_p, p);
201  }
202  last_p = p;
203  }
204  }
205 
206  wform_put_border(tgt, w, h);
207 
208  return rval;
209 }
210 
212 {
213  if (ibuf->rect_float) {
215  }
217 }
218 
220 {
221  ImBuf *rval = IMB_allocImBuf(ibuf->x + 3, 515, 32, IB_rect);
222  int x, y;
223  const uchar *src = (const uchar *)ibuf->rect;
224  uchar *tgt = (uchar *)rval->rect;
225  int w = ibuf->x + 3;
226  int sw = ibuf->x / 3;
227  int h = 515;
228  float waveform_gamma = 0.2;
229  uchar wtable[256];
230 
231  wform_put_grid(tgt, w, h);
232 
233  for (x = 0; x < 256; x++) {
234  wtable[x] = (uchar)(pow(((float)x + 1) / 256, waveform_gamma) * 255);
235  }
236 
237  for (y = 0; y < ibuf->y; y++) {
238  uchar *last_p[3] = {NULL, NULL, NULL};
239 
240  for (x = 0; x < ibuf->x; x++) {
241  int c;
242  const uchar *rgb = src + 4 * (ibuf->x * y + x);
243  for (c = 0; c < 3; c++) {
244  uchar *p = tgt;
245  p += 4 * (w * ((rgb[c] * (h - 3)) / 255 + 1) + c * sw + x / 3 + 1);
246 
247  scope_put_pixel_single(wtable, p, c);
248  p += 4 * w;
249  scope_put_pixel_single(wtable, p, c);
250 
251  if (last_p[c] != NULL) {
252  wform_put_line_single(w, last_p[c], p, c);
253  }
254  last_p[c] = p;
255  }
256  }
257  }
258 
259  wform_put_border(tgt, w, h);
260 
261  return rval;
262 }
263 
265 {
266  ImBuf *rval = IMB_allocImBuf(ibuf->x + 3, 515, 32, IB_rect);
267  int x, y;
268  const float *src = ibuf->rect_float;
269  uchar *tgt = (uchar *)rval->rect;
270  int w = ibuf->x + 3;
271  int sw = ibuf->x / 3;
272  int h = 515;
273  float waveform_gamma = 0.2;
274  uchar wtable[256];
275 
276  wform_put_grid(tgt, w, h);
277 
278  for (x = 0; x < 256; x++) {
279  wtable[x] = (uchar)(pow(((float)x + 1) / 256, waveform_gamma) * 255);
280  }
281 
282  for (y = 0; y < ibuf->y; y++) {
283  uchar *last_p[3] = {NULL, NULL, NULL};
284 
285  for (x = 0; x < ibuf->x; x++) {
286  int c;
287  const float *rgb = src + 4 * (ibuf->x * y + x);
288  for (c = 0; c < 3; c++) {
289  uchar *p = tgt;
290  float v = rgb[c];
291 
292  CLAMP(v, 0.0f, 1.0f);
293 
294  p += 4 * (w * ((int)(v * (h - 3)) + 1) + c * sw + x / 3 + 1);
295 
296  scope_put_pixel_single(wtable, p, c);
297  p += 4 * w;
298  scope_put_pixel_single(wtable, p, c);
299 
300  if (last_p[c] != NULL) {
301  wform_put_line_single(w, last_p[c], p, c);
302  }
303  last_p[c] = p;
304  }
305  }
306  }
307 
308  wform_put_border(tgt, w, h);
309 
310  return rval;
311 }
312 
314 {
315  if (ibuf->rect_float) {
317  }
319 }
320 
321 static void draw_zebra_byte(ImBuf *src, ImBuf *ibuf, float perc)
322 {
323  uint limit = 255.0f * perc / 100.0f;
324  uchar *p = (uchar *)src->rect;
325  uchar *o = (uchar *)ibuf->rect;
326  int x;
327  int y;
328 
329  for (y = 0; y < ibuf->y; y++) {
330  for (x = 0; x < ibuf->x; x++) {
331  uchar r = *p++;
332  uchar g = *p++;
333  uchar b = *p++;
334  uchar a = *p++;
335 
336  if (r >= limit || g >= limit || b >= limit) {
337  if (((x + y) & 0x08) != 0) {
338  r = 255 - r;
339  g = 255 - g;
340  b = 255 - b;
341  }
342  }
343  *o++ = r;
344  *o++ = g;
345  *o++ = b;
346  *o++ = a;
347  }
348  }
349 }
350 
351 static void draw_zebra_float(ImBuf *src, ImBuf *ibuf, float perc)
352 {
353  float limit = perc / 100.0f;
354  const float *p = src->rect_float;
355  uchar *o = (uchar *)ibuf->rect;
356  int x;
357  int y;
358 
359  for (y = 0; y < ibuf->y; y++) {
360  for (x = 0; x < ibuf->x; x++) {
361  float r = *p++;
362  float g = *p++;
363  float b = *p++;
364  float a = *p++;
365 
366  if (r >= limit || g >= limit || b >= limit) {
367  if (((x + y) & 0x08) != 0) {
368  r = -r;
369  g = -g;
370  b = -b;
371  }
372  }
373 
378  }
379  }
380 }
381 
383 {
384  ImBuf *new_ibuf = IMB_allocImBuf(ibuf->x, ibuf->y, 32, IB_rect);
385 
386  if (ibuf->rect_float) {
387  draw_zebra_float(ibuf, new_ibuf, perc);
388  }
389  else {
390  draw_zebra_byte(ibuf, new_ibuf, perc);
391  }
392  return new_ibuf;
393 }
394 
395 static void draw_histogram_marker(ImBuf *ibuf, int x)
396 {
397  uchar *p = (uchar *)ibuf->rect;
398  int barh = ibuf->y * 0.1;
399 
400  p += 4 * (x + ibuf->x * (ibuf->y - barh + 1));
401 
402  for (int i = 0; i < barh - 1; i++) {
403  p[0] = p[1] = p[2] = 255;
404  p += ibuf->x * 4;
405  }
406 }
407 
408 static void draw_histogram_bar(ImBuf *ibuf, int x, float val, int col)
409 {
410  uchar *p = (uchar *)ibuf->rect;
411  int barh = ibuf->y * val * 0.9f;
412 
413  p += 4 * (x + ibuf->x);
414 
415  for (int i = 0; i < barh; i++) {
416  p[col] = 255;
417  p += ibuf->x * 4;
418  }
419 }
420 
421 #define HIS_STEPS 512
422 
423 typedef struct MakeHistogramViewData {
424  const ImBuf *ibuf;
426 
427 static void make_histogram_view_from_ibuf_byte_fn(void *__restrict userdata,
428  const int y,
429  const TaskParallelTLS *__restrict tls)
430 {
431  MakeHistogramViewData *data = userdata;
432  const ImBuf *ibuf = data->ibuf;
433  const uchar *src = (uchar *)ibuf->rect;
434 
435  uint32_t(*cur_bins)[HIS_STEPS] = tls->userdata_chunk;
436 
437  for (int x = 0; x < ibuf->x; x++) {
438  const uchar *pixel = src + (y * ibuf->x + x) * 4;
439 
440  for (int j = 3; j--;) {
441  cur_bins[j][pixel[j]]++;
442  }
443  }
444 }
445 
446 static void make_histogram_view_from_ibuf_reduce(const void *__restrict UNUSED(userdata),
447  void *__restrict chunk_join,
448  void *__restrict chunk)
449 {
450  uint32_t(*join_bins)[HIS_STEPS] = chunk_join;
451  uint32_t(*bins)[HIS_STEPS] = chunk;
452 
453  for (int j = 3; j--;) {
454  for (int i = 0; i < HIS_STEPS; i++) {
455  join_bins[j][i] += bins[j][i];
456  }
457  }
458 }
459 
461 {
462  ImBuf *rval = IMB_allocImBuf(515, 128, 32, IB_rect);
463  int x;
464  uint nr, ng, nb;
465 
466  uint bins[3][HIS_STEPS];
467 
468  memset(bins, 0, sizeof(bins));
469 
471  .ibuf = ibuf,
472  };
473  TaskParallelSettings settings;
475  settings.use_threading = (ibuf->y >= 256);
476  settings.userdata_chunk = bins;
477  settings.userdata_chunk_size = sizeof(bins);
480 
481  nr = nb = ng = 0;
482  for (x = 0; x < HIS_STEPS; x++) {
483  if (bins[0][x] > nr) {
484  nr = bins[0][x];
485  }
486  if (bins[1][x] > ng) {
487  ng = bins[1][x];
488  }
489  if (bins[2][x] > nb) {
490  nb = bins[2][x];
491  }
492  }
493 
494  for (x = 0; x < HIS_STEPS; x++) {
495  if (nr) {
496  draw_histogram_bar(rval, x * 2 + 1, ((float)bins[0][x]) / nr, 0);
497  draw_histogram_bar(rval, x * 2 + 2, ((float)bins[0][x]) / nr, 0);
498  }
499  if (ng) {
500  draw_histogram_bar(rval, x * 2 + 1, ((float)bins[1][x]) / ng, 1);
501  draw_histogram_bar(rval, x * 2 + 2, ((float)bins[1][x]) / ng, 1);
502  }
503  if (nb) {
504  draw_histogram_bar(rval, x * 2 + 1, ((float)bins[2][x]) / nb, 2);
505  draw_histogram_bar(rval, x * 2 + 2, ((float)bins[2][x]) / nb, 2);
506  }
507  }
508 
509  wform_put_border((uchar *)rval->rect, rval->x, rval->y);
510 
511  return rval;
512 }
513 
515 {
516  if (f < -0.25f) {
517  return 0;
518  }
519  if (f >= 1.25f) {
520  return 511;
521  }
522 
523  return (int)(((f + 0.25f) / 1.5f) * 512);
524 }
525 
526 static void make_histogram_view_from_ibuf_float_fn(void *__restrict userdata,
527  const int y,
528  const TaskParallelTLS *__restrict tls)
529 {
530  const MakeHistogramViewData *data = userdata;
531  const ImBuf *ibuf = data->ibuf;
532  const float *src = ibuf->rect_float;
533 
534  uint32_t(*cur_bins)[HIS_STEPS] = tls->userdata_chunk;
535 
536  for (int x = 0; x < ibuf->x; x++) {
537  const float *pixel = src + (y * ibuf->x + x) * 4;
538 
539  for (int j = 3; j--;) {
540  cur_bins[j][get_bin_float(pixel[j])]++;
541  }
542  }
543 }
544 
546 {
547  ImBuf *rval = IMB_allocImBuf(515, 128, 32, IB_rect);
548  int nr, ng, nb;
549  int x;
550 
551  uint bins[3][HIS_STEPS];
552 
553  memset(bins, 0, sizeof(bins));
554 
556  .ibuf = ibuf,
557  };
558  TaskParallelSettings settings;
560  settings.use_threading = (ibuf->y >= 256);
561  settings.userdata_chunk = bins;
562  settings.userdata_chunk_size = sizeof(bins);
565 
566  nr = nb = ng = 0;
567  for (x = 0; x < HIS_STEPS; x++) {
568  if (bins[0][x] > nr) {
569  nr = bins[0][x];
570  }
571  if (bins[1][x] > ng) {
572  ng = bins[1][x];
573  }
574  if (bins[2][x] > nb) {
575  nb = bins[2][x];
576  }
577  }
578 
579  for (x = 0; x < HIS_STEPS; x++) {
580  if (nr) {
581  draw_histogram_bar(rval, x + 1, ((float)bins[0][x]) / nr, 0);
582  }
583  if (ng) {
584  draw_histogram_bar(rval, x + 1, ((float)bins[1][x]) / ng, 1);
585  }
586  if (nb) {
587  draw_histogram_bar(rval, x + 1, ((float)bins[2][x]) / nb, 2);
588  }
589  }
590 
593  wform_put_border((uchar *)rval->rect, rval->x, rval->y);
594 
595  return rval;
596 }
597 
598 #undef HIS_STEPS
599 
601 {
602  if (ibuf->rect_float) {
604  }
606 }
607 
608 static void vectorscope_put_cross(uchar r, uchar g, uchar b, char *tgt, int w, int h, int size)
609 {
610  float rgb[3], yuv[3];
611  char *p;
612 
613  rgb[0] = (float)r / 255.0f;
614  rgb[1] = (float)g / 255.0f;
615  rgb[2] = (float)b / 255.0f;
617 
618  p = tgt + 4 * (w * (int)((yuv[2] * (h - 3) + 1)) + (int)((yuv[1] * (w - 3) + 1)));
619 
620  if (r == 0 && g == 0 && b == 0) {
621  r = 255;
622  }
623 
624  for (int y = -size; y <= size; y++) {
625  for (int x = -size; x <= size; x++) {
626  char *q = p + 4 * (y * w + x);
627  q[0] = r;
628  q[1] = g;
629  q[2] = b;
630  q[3] = 255;
631  }
632  }
633 }
634 
636 {
637  ImBuf *rval = IMB_allocImBuf(515, 515, 32, IB_rect);
638  int x, y;
639  const char *src = (const char *)ibuf->rect;
640  char *tgt = (char *)rval->rect;
641  float rgb[3], yuv[3];
642  int w = 515;
643  int h = 515;
644  float scope_gamma = 0.2;
645  uchar wtable[256];
646 
647  for (x = 0; x < 256; x++) {
648  wtable[x] = (uchar)(pow(((float)x + 1) / 256, scope_gamma) * 255);
649  }
650 
651  for (x = 0; x < 256; x++) {
652  vectorscope_put_cross(255, 0, 255 - x, tgt, w, h, 1);
653  vectorscope_put_cross(255, x, 0, tgt, w, h, 1);
654  vectorscope_put_cross(255 - x, 255, 0, tgt, w, h, 1);
655  vectorscope_put_cross(0, 255, x, tgt, w, h, 1);
656  vectorscope_put_cross(0, 255 - x, 255, tgt, w, h, 1);
657  vectorscope_put_cross(x, 0, 255, tgt, w, h, 1);
658  }
659 
660  for (y = 0; y < ibuf->y; y++) {
661  for (x = 0; x < ibuf->x; x++) {
662  const char *src1 = src + 4 * (ibuf->x * y + x);
663  char *p;
664 
665  rgb[0] = (float)src1[0] / 255.0f;
666  rgb[1] = (float)src1[1] / 255.0f;
667  rgb[2] = (float)src1[2] / 255.0f;
669 
670  p = tgt + 4 * (w * (int)((yuv[2] * (h - 3) + 1)) + (int)((yuv[1] * (w - 3) + 1)));
671  scope_put_pixel(wtable, (uchar *)p);
672  }
673  }
674 
675  vectorscope_put_cross(0, 0, 0, tgt, w, h, 3);
676 
677  return rval;
678 }
679 
681 {
682  ImBuf *rval = IMB_allocImBuf(515, 515, 32, IB_rect);
683  int x, y;
684  const float *src = ibuf->rect_float;
685  char *tgt = (char *)rval->rect;
686  float rgb[3], yuv[3];
687  int w = 515;
688  int h = 515;
689  float scope_gamma = 0.2;
690  uchar wtable[256];
691 
692  for (x = 0; x < 256; x++) {
693  wtable[x] = (uchar)(pow(((float)x + 1) / 256, scope_gamma) * 255);
694  }
695 
696  for (x = 0; x <= 255; x++) {
697  vectorscope_put_cross(255, 0, 255 - x, tgt, w, h, 1);
698  vectorscope_put_cross(255, x, 0, tgt, w, h, 1);
699  vectorscope_put_cross(255 - x, 255, 0, tgt, w, h, 1);
700  vectorscope_put_cross(0, 255, x, tgt, w, h, 1);
701  vectorscope_put_cross(0, 255 - x, 255, tgt, w, h, 1);
702  vectorscope_put_cross(x, 0, 255, tgt, w, h, 1);
703  }
704 
705  for (y = 0; y < ibuf->y; y++) {
706  for (x = 0; x < ibuf->x; x++) {
707  const float *src1 = src + 4 * (ibuf->x * y + x);
708  const char *p;
709 
710  memcpy(rgb, src1, sizeof(float[3]));
711 
712  clamp_v3(rgb, 0.0f, 1.0f);
713 
715 
716  p = tgt + 4 * (w * (int)((yuv[2] * (h - 3) + 1)) + (int)((yuv[1] * (w - 3) + 1)));
717  scope_put_pixel(wtable, (uchar *)p);
718  }
719  }
720 
721  vectorscope_put_cross(0, 0, 0, tgt, w, h, 3);
722 
723  return rval;
724 }
725 
727 {
728  if (ibuf->rect_float) {
730  }
732 }
typedef float(TangentPoint)[2]
#define BLI_INLINE
MINLINE void clamp_v3(float vec[3], float min, float max)
unsigned char uchar
Definition: BLI_sys_types.h:70
unsigned int uint
Definition: BLI_sys_types.h:67
void BLI_task_parallel_range(int start, int stop, void *userdata, TaskParallelRangeFunc func, const TaskParallelSettings *settings)
Definition: task_range.cc:94
BLI_INLINE void BLI_parallel_range_settings_defaults(TaskParallelSettings *settings)
Definition: BLI_task.h:293
#define UNUSED(x)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble GLdouble r _GL_VOID_RET _GL_VOID GLfloat GLfloat r _GL_VOID_RET _GL_VOID GLint GLint r _GL_VOID_RET _GL_VOID GLshort GLshort r _GL_VOID_RET _GL_VOID GLdouble GLdouble r
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
BLI_INLINE unsigned char IMB_colormanagement_get_luminance_byte(const unsigned char[3])
BLI_INLINE float IMB_colormanagement_get_luminance(const float rgb[3])
struct ImBuf * IMB_allocImBuf(unsigned int x, unsigned int y, unsigned char planes, unsigned int flags)
Definition: allocimbuf.c:500
Contains defines and structs used throughout the imbuf module.
@ IB_rect
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position CLAMP
ATTR_WARN_UNUSED_RESULT const BMVert * v
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
Definition: btDbvt.cpp:52
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
Definition: btQuadWord.h:119
SyclQueue void void * src
uint pos
uint col
ccl_gpu_kernel_postfix ccl_global float int int int sw
MINLINE unsigned char unit_float_to_uchar_clamp(float val)
ccl_device_inline float3 pow(float3 v, float e)
Definition: math_float3.h:533
static unsigned c
Definition: RandGen.cpp:83
static unsigned a[3]
Definition: RandGen.cpp:78
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
static const pxr::TfToken g("g", pxr::TfToken::Immortal)
static const pxr::TfToken rgb("rgb", pxr::TfToken::Immortal)
ImBuf * make_histogram_view_from_ibuf(ImBuf *ibuf)
static ImBuf * make_waveform_view_from_ibuf_float(ImBuf *ibuf)
static void draw_histogram_marker(ImBuf *ibuf, int x)
static void draw_histogram_bar(ImBuf *ibuf, int x, float val, int col)
static void make_histogram_view_from_ibuf_byte_fn(void *__restrict userdata, const int y, const TaskParallelTLS *__restrict tls)
ImBuf * make_zebra_view_from_ibuf(ImBuf *ibuf, float perc)
ImBuf * make_waveform_view_from_ibuf(ImBuf *ibuf)
static void wform_put_line_single(int w, uchar *last_pos, uchar *new_pos, int col)
static void wform_put_grid(uchar *tgt, int w, int h)
ImBuf * make_vectorscope_view_from_ibuf(ImBuf *ibuf)
static ImBuf * make_vectorscope_view_from_ibuf_byte(ImBuf *ibuf)
static ImBuf * make_sep_waveform_view_from_ibuf_float(ImBuf *ibuf)
static ImBuf * make_vectorscope_view_from_ibuf_float(ImBuf *ibuf)
static void wform_put_line(int w, uchar *last_pos, uchar *new_pos)
BLI_INLINE int get_bin_float(float f)
ImBuf * make_sep_waveform_view_from_ibuf(ImBuf *ibuf)
static ImBuf * make_sep_waveform_view_from_ibuf_byte(ImBuf *ibuf)
static ImBuf * make_histogram_view_from_ibuf_float(ImBuf *ibuf)
static void wform_put_border(uchar *tgt, int w, int h)
struct MakeHistogramViewData MakeHistogramViewData
static void scope_put_pixel(const uchar *table, uchar *pos)
static void wform_put_gridrow(uchar *tgt, float perc, int w, int h)
static void scope_put_pixel_single(const uchar *table, uchar *pos, int col)
static void vectorscope_put_cross(uchar r, uchar g, uchar b, char *tgt, int w, int h, int size)
static void draw_zebra_float(ImBuf *src, ImBuf *ibuf, float perc)
static ImBuf * make_histogram_view_from_ibuf_byte(ImBuf *ibuf)
static void make_histogram_view_from_ibuf_float_fn(void *__restrict userdata, const int y, const TaskParallelTLS *__restrict tls)
static void rgb_to_yuv_normalized(const float rgb[3], float yuv[3])
#define HIS_STEPS
static ImBuf * make_waveform_view_from_ibuf_byte(ImBuf *ibuf)
static void make_histogram_view_from_ibuf_reduce(const void *__restrict UNUSED(userdata), void *__restrict chunk_join, void *__restrict chunk)
static void draw_zebra_byte(ImBuf *src, ImBuf *ibuf, float perc)
unsigned int uint32_t
Definition: stdint.h:80
unsigned int * rect
float * rect_float
TaskParallelReduceFunc func_reduce
Definition: BLI_task.h:181
size_t userdata_chunk_size
Definition: BLI_task.h:169