- int *lookup_r = plugin->preview_lookup[HISTOGRAM_RED];
- int *lookup_g = plugin->preview_lookup[HISTOGRAM_GREEN];
- int *lookup_b = plugin->preview_lookup[HISTOGRAM_BLUE];
-
- switch(data->get_color_model())
- {
- case BC_RGB888:
- HISTOGRAM_HEAD(unsigned char)
- r = (row[0] << 8) | row[0];
- g = (row[1] << 8) | row[1];
- b = (row[2] << 8) | row[2];
- HISTOGRAM_TAIL(3)
- break;
- case BC_RGB_FLOAT:
- HISTOGRAM_HEAD(float)
- r = (int)(row[0] * 0xffff);
- g = (int)(row[1] * 0xffff);
- b = (int)(row[2] * 0xffff);
- HISTOGRAM_TAIL(3)
- break;
- case BC_YUV888:
- HISTOGRAM_HEAD(unsigned char)
- y = (row[0] << 8) | row[0];
- u = (row[1] << 8) | row[1];
- v = (row[2] << 8) | row[2];
- YUV::yuv.yuv_to_rgb_16(r, g, b, y, u, v);
- HISTOGRAM_TAIL(3)
- break;
- case BC_RGBA8888:
- HISTOGRAM_HEAD(unsigned char)
- r = (row[0] << 8) | row[0];
- g = (row[1] << 8) | row[1];
- b = (row[2] << 8) | row[2];
- HISTOGRAM_TAIL(4)
- break;
- case BC_RGBA_FLOAT:
- HISTOGRAM_HEAD(float)
- r = (int)(row[0] * 0xffff);
- g = (int)(row[1] * 0xffff);
- b = (int)(row[2] * 0xffff);
- HISTOGRAM_TAIL(4)
- break;
- case BC_YUVA8888:
- HISTOGRAM_HEAD(unsigned char)
- y = (row[0] << 8) | row[0];
- u = (row[1] << 8) | row[1];
- v = (row[2] << 8) | row[2];
- YUV::yuv.yuv_to_rgb_16(r, g, b, y, u, v);
- HISTOGRAM_TAIL(4)
- break;
- case BC_RGB161616:
- HISTOGRAM_HEAD(uint16_t)
- r = row[0];
- g = row[1];
- b = row[2];
- HISTOGRAM_TAIL(3)
- break;
- case BC_YUV161616:
- HISTOGRAM_HEAD(uint16_t)
- y = row[0];
- u = row[1];
- v = row[2];
- YUV::yuv.yuv_to_rgb_16(r, g, b, y, u, v);
- HISTOGRAM_TAIL(3)
- break;
- case BC_RGBA16161616:
- HISTOGRAM_HEAD(uint16_t)
- r = row[0];
- g = row[1];
- b = row[2];
- HISTOGRAM_TAIL(3)
- break;
- case BC_YUVA16161616:
- HISTOGRAM_HEAD(uint16_t)
- y = row[0];
- u = row[1];
- v = row[2];
- YUV::yuv.yuv_to_rgb_16(r, g, b, y, u, v);
- HISTOGRAM_TAIL(4)
- break;
+ int *preview_r = plugin->preview_lookup[HISTOGRAM_RED];
+ int *preview_g = plugin->preview_lookup[HISTOGRAM_GREEN];
+ int *preview_b = plugin->preview_lookup[HISTOGRAM_BLUE];
+
+ switch( data->get_color_model() ) {
+ case BC_RGB888:
+ HISTOGRAM_HEAD(unsigned char)
+ r = (row[0] << 8) | row[0];
+ g = (row[1] << 8) | row[1];
+ b = (row[2] << 8) | row[2];
+ HISTOGRAM_TAIL(3)
+ break;
+ case BC_RGB_FLOAT:
+ HISTOGRAM_HEAD(float)
+ r = (int)(row[0] * 0xffff);
+ g = (int)(row[1] * 0xffff);
+ b = (int)(row[2] * 0xffff);
+ HISTOGRAM_TAIL(3)
+ break;
+ case BC_YUV888:
+ HISTOGRAM_HEAD(unsigned char)
+ y = (row[0] << 8) | row[0];
+ u = (row[1] << 8) | row[1];
+ v = (row[2] << 8) | row[2];
+ YUV::yuv.yuv_to_rgb_16(r, g, b, y, u, v);
+ HISTOGRAM_TAIL(3)
+ break;
+ case BC_RGBA8888:
+ HISTOGRAM_HEAD(unsigned char)
+ r = (row[0] << 8) | row[0];
+ g = (row[1] << 8) | row[1];
+ b = (row[2] << 8) | row[2];
+ HISTOGRAM_TAIL(4)
+ break;
+ case BC_RGBA_FLOAT:
+ HISTOGRAM_HEAD(float)
+ r = (int)(row[0] * 0xffff);
+ g = (int)(row[1] * 0xffff);
+ b = (int)(row[2] * 0xffff);
+ HISTOGRAM_TAIL(4)
+ break;
+ case BC_YUVA8888:
+ HISTOGRAM_HEAD(unsigned char)
+ y = (row[0] << 8) | row[0];
+ u = (row[1] << 8) | row[1];
+ v = (row[2] << 8) | row[2];
+ YUV::yuv.yuv_to_rgb_16(r, g, b, y, u, v);
+ HISTOGRAM_TAIL(4)
+ break;
+ case BC_RGB161616:
+ HISTOGRAM_HEAD(uint16_t)
+ r = row[0];
+ g = row[1];
+ b = row[2];
+ HISTOGRAM_TAIL(3)
+ break;
+ case BC_YUV161616:
+ HISTOGRAM_HEAD(uint16_t)
+ y = row[0];
+ u = row[1];
+ v = row[2];
+ YUV::yuv.yuv_to_rgb_16(r, g, b, y, u, v);
+ HISTOGRAM_TAIL(3)
+ break;
+ case BC_RGBA16161616:
+ HISTOGRAM_HEAD(uint16_t)
+ r = row[0];
+ g = row[1];
+ b = row[2];
+ HISTOGRAM_TAIL(3)
+ break;
+ case BC_YUVA16161616:
+ HISTOGRAM_HEAD(uint16_t)
+ y = row[0];
+ u = row[1];
+ v = row[2];
+ YUV::yuv.yuv_to_rgb_16(r, g, b, y, u, v);
+ HISTOGRAM_TAIL(4)
+ break;