Grok  7.6.6
Namespaces | Macros
FileFormat.cpp File Reference
#include "grk_includes.h"
#include <string>

Namespaces

 grk
 Copyright (C) 2016-2021 Grok Image Compression Inc.
 

Macros

#define GRK_BOX_SIZE   1024
 
#define GRK_RESOLUTION_BOX_SIZE   (4+4+10)
 
#define MAX   15
 

Local static functions

static const BoxReadHandler grk::jp2_header []
 
static const BoxReadHandler grk::jp2_img_header []
 
static bool grk::jp2_read_ihdr (FileFormat *fileFormat, uint8_t *p_image_header_data, uint32_t image_header_size)
 Reads a IHDR box - Image Header box. More...
 
static uint8_t * grk::jp2_write_ihdr (FileFormat *fileFormat, uint32_t *p_nb_bytes_written)
 Writes the Image Header box - Image Header box. More...
 
static bool grk::jp2_read_xml (FileFormat *fileFormat, uint8_t *p_xml_data, uint32_t xml_size)
 Read XML box. More...
 
static bool grk::jp2_read_asoc (FileFormat *fileFormat, uint8_t *header_data, uint32_t header_data_size)
 Read Associated data. More...
 
static uint8_t * grk::jp2_write_xml (FileFormat *fileFormat, uint32_t *p_nb_bytes_written)
 Write XML box. More...
 
static bool grk::jp2_read_uuid (FileFormat *fileFormat, uint8_t *p_header_data, uint32_t header_data_size)
 Read a UUID box. More...
 
static bool grk::jp2_read_res (FileFormat *fileFormat, uint8_t *p_resolution_data, uint32_t resolution_size)
 Reads a Resolution box. More...
 
static uint8_t * grk::jp2_write_res (FileFormat *fileFormat, uint32_t *p_nb_bytes_written)
 Writes the Resolution box. More...
 
static uint8_t * grk::jp2_write_bpc (FileFormat *fileFormat, uint32_t *p_nb_bytes_written)
 Writes the Bit per Component box. More...
 
static bool grk::jp2_read_bpc (FileFormat *fileFormat, uint8_t *p_bpc_header_data, uint32_t bpc_header_size)
 Reads a Bit per Component box. More...
 
static bool grk::jp2_read_channel_definition (FileFormat *fileFormat, uint8_t *p_cdef_header_data, uint32_t cdef_header_size)
 
static uint8_t * grk::jp2_write_channel_definition (FileFormat *fileFormat, uint32_t *p_nb_bytes_written)
 Writes the Channel Definition box. More...
 
static uint8_t * grk::jp2_write_colr (FileFormat *fileFormat, uint32_t *p_nb_bytes_written)
 Writes the Colour Specification box. More...
 
static bool grk::jp2_write_ftyp (FileFormat *fileFormat)
 Writes a FTYP box - File type box. More...
 
static bool grk::jp2_read_ftyp (FileFormat *fileFormat, uint8_t *p_header_data, uint32_t header_size)
 Reads a a FTYP box - File type box. More...
 
static bool grk::jp2_skip_jp2c (FileFormat *fileFormat)
 
static bool grk::jp2_read_jp2h (FileFormat *fileFormat, uint8_t *p_header_data, uint32_t header_size)
 Reads the Jpeg2000 file Header box - JP2 Header box (warning, this is a super box). More...
 
static bool grk::jp2_write_uuids (FileFormat *fileFormat)
 
static bool grk::jp2_write_jp2c (FileFormat *fileFormat)
 Writes the Jpeg2000 code stream Header box - JP2C Header box. More...
 
static bool grk::jp2_read_jp (FileFormat *fileFormat, uint8_t *p_header_data, uint32_t header_size)
 Reads a JPEG 2000 file signature box. More...
 
static bool grk::jp2_write_jp (FileFormat *fileFormat)
 Writes a JPEG 2000 file signature box. More...
 
static uint8_t * grk::jp2_write_palette_clr (FileFormat *fileFormat, uint32_t *p_nb_bytes_written)
 
static uint8_t * grk::jp2_write_component_mapping (FileFormat *fileFormat, uint32_t *p_nb_bytes_written)
 
static bool grk::jp2_read_palette_clr (FileFormat *fileFormat, uint8_t *p_pclr_header_data, uint32_t pclr_header_size)
 Collect palette data. More...
 
static bool grk::jp2_read_component_mapping (FileFormat *fileFormat, uint8_t *component_mapping_header_data, uint32_t component_mapping_header_size)
 Collect component mapping data. More...
 
static bool grk::jp2_read_colr (FileFormat *fileFormat, uint8_t *p_colr_header_data, uint32_t colr_header_size)
 Reads the Color Specification box. More...
 
static bool grk::jp2_init_end_header_writing (FileFormat *fileFormat)
 Sets up the procedures to do on writing header after the code stream. More...
 
static bool grk::jp2_init_end_header_reading (FileFormat *fileFormat)
 Sets up the procedures to do on reading header after the code stream. More...
 
static bool grk::jp2_read_header_procedure (FileFormat *fileFormat)
 Reads a JPEG 2000 file header structure. More...
 
static bool grk::jp2_exec (FileFormat *fileFormat, std::vector< jp2_procedure > *procs)
 Executes the given procedures on the given codec. More...
 
static bool grk::jp2_init_compress_validation (FileFormat *fileFormat)
 Sets up the validation ,i.e. More...
 
static bool grk::jp2_init_header_writing (FileFormat *fileFormat)
 Sets up the procedures to do on writing header. More...
 
static bool grk::jp2_default_validation (FileFormat *fileFormat)
 
static const BoxReadHandler * grk::jp2_img_find_handler (uint32_t id)
 Finds the image execution function related to the given box id. More...
 
static const BoxReadHandler * grk::jp2_find_handler (uint32_t id)
 Finds the execution function related to the given box id. More...
 
static bool grk::jp2_write_jp2h (FileFormat *fileFormat)
 

Macro Definition Documentation

◆ GRK_BOX_SIZE

#define GRK_BOX_SIZE   1024

◆ GRK_RESOLUTION_BOX_SIZE

#define GRK_RESOLUTION_BOX_SIZE   (4+4+10)

◆ MAX

#define MAX   15