![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "common/darktable.h"
#include "common/exif.h"
#include "common/imageio_j2k.h"
#include "develop/imageop.h"
#include <assert.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <openjpeg.h>
Macros | |
#define | J2K_CFMT 0 |
#define | JP2_CFMT 1 |
#define | JPT_CFMT 2 |
Functions | |
static void | color_sycc_to_rgb (opj_image_t *img) |
static void | error_callback (const char *msg, void *client_data) |
static int | get_file_format (const char *filename) |
dt_imageio_retval_t | dt_imageio_open_j2k (dt_image_t *img, const char *filename, dt_mipmap_buffer_t *mbuf) |
int | dt_imageio_j2k_read_profile (const char *filename, uint8_t **out) |
static void | sycc_to_rgb (int offset, int upb, int y, int cb, int cr, int *out_r, int *out_g, int *out_b) |
static void | sycc444_to_rgb (opj_image_t *img) |
static void | sycc422_to_rgb (opj_image_t *img) |
static void | sycc420_to_rgb (opj_image_t *img) |
Variables | |
static char | JP2_HEAD [] = { 0x0, 0x0, 0x0, 0x0C, 0x6A, 0x50, 0x20, 0x20, 0x0D, 0x0A, 0x87, 0x0A } |
static char | JP2_MAGIC [] = { 0x0d, 0x0a, 0x87, 0x0a } |
static char | J2K_HEAD [] = { 0xFF, 0x4F, 0xFF, 0x51, 0x00 } |
#define J2K_CFMT 0 |
#define JP2_CFMT 1 |
#define JPT_CFMT 2 |
|
static |
References sycc420_to_rgb(), sycc422_to_rgb(), and sycc444_to_rgb().
Referenced by dt_imageio_open_j2k().
int dt_imageio_j2k_read_profile | ( | const char * | filename, |
uint8_t ** | out | ||
) |
reads the color profile attached to the image
References DT_IMAGEIO_FILE_CORRUPTED, get_file_format(), J2K_HEAD, JP2_HEAD, and JP2_MAGIC.
Referenced by dt_image_find_best_color_profile().
dt_imageio_retval_t dt_imageio_open_j2k | ( | dt_image_t * | img, |
const char * | filename, | ||
dt_mipmap_buffer_t * | mbuf | ||
) |
References dt_image_t::buf_dsc, dt_iop_buffer_dsc_t::channels, color_sycc_to_rgb(), dt_iop_buffer_dsc_t::cst, darktable, dt_iop_buffer_dsc_t::datatype, dt_exif_read(), DT_IMAGE_LDR, DT_IMAGEIO_CACHE_FULL, DT_IMAGEIO_FILE_CORRUPTED, DT_IMAGEIO_FILE_NOT_FOUND, DT_IMAGEIO_OK, dt_mipmap_cache_alloc(), error_callback(), dt_image_t::exif_inited, dt_iop_buffer_dsc_t::filters, dt_image_t::flags, get_file_format(), dt_image_t::height, IOP_CS_RGB, J2K_CFMT, J2K_HEAD, JP2_CFMT, JP2_HEAD, JP2_MAGIC, JPT_CFMT, dt_image_t::loader, LOADER_J2K, MIN, darktable_t::num_openmp_threads, TYPE_FLOAT, void(), and dt_image_t::width.
Referenced by dt_imageio_open_raster().
sample error callback expecting a FILE* client object
Referenced by dt_imageio_open_j2k().
|
static |
sample warning callback expecting a FILE* client object sample debug callback expecting no client object
References extension(), J2K_CFMT, JP2_CFMT, and JPT_CFMT.
Referenced by dt_imageio_j2k_read_profile(), and dt_imageio_open_j2k().
|
static |
References sycc_to_rgb().
Referenced by color_sycc_to_rgb().
|
static |
References sycc_to_rgb().
Referenced by color_sycc_to_rgb().
|
static |
References sycc_to_rgb().
Referenced by color_sycc_to_rgb().
|
static |
Referenced by sycc420_to_rgb(), sycc422_to_rgb(), and sycc444_to_rgb().
|
static |
Referenced by dt_imageio_j2k_read_profile(), and dt_imageio_open_j2k().
|
static |
Referenced by dt_imageio_j2k_read_profile(), and dt_imageio_open_j2k().
|
static |
Referenced by dt_imageio_j2k_read_profile(), and dt_imageio_open_j2k().