OpenJPEG  2.5.0
Macros | Functions
imgreg_manager.c File Reference
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <assert.h>
#include "imgreg_manager.h"

Macros

#define FCGI_stdout   stdout
 
#define FCGI_stderr   stderr
 
#define logstream   stderr
 

Functions

imgreg_param_t map_viewin2imgreg (const int fx, const int fy, const int rx, const int ry, const int rw, const int rh, const int XOsiz, const int YOsiz, const int Xsiz, const int Ysiz, const int numOfreslev)
 map view-window requests to codestream image resolutions and regions More...
 
void find_level (int maxlev, int *lev, int *fx, int *fy, int *xmin, int *ymin, int *xmax, int *ymax)
 find deconposition level and its resolution size C.4.1 Mapping view-window requests to codestream image resolution and regions Note: only round-down implemented More...
 
int comp_decomplev (int fw, int fh, int Xsiz, int Ysiz)
 compute decomposition level (only to get the level use find_level for all parameters More...
 
void print_imgreg (imgreg_param_t imgreg)
 print image region parameters More...
 

Macro Definition Documentation

◆ FCGI_stderr

#define FCGI_stderr   stderr

◆ FCGI_stdout

#define FCGI_stdout   stdout

◆ logstream

#define logstream   stderr

Function Documentation

◆ comp_decomplev()

int comp_decomplev ( int  fw,
int  fh,
int  Xsiz,
int  Ysiz 
)

compute decomposition level (only to get the level use find_level for all parameters

Parameters
[in]fwhorizontal frame size
[in]fhvertical frame size
[in]Xsizimage width
[in]Ysizimage height
Returns
decomposition level

References find_level().

Referenced by recons_codestream_from_JPPstream(), and recons_codestream_from_JPTstream().

◆ find_level()

void find_level ( int  maxlev,
int *  lev,
int *  fx,
int *  fy,
int *  xmin,
int *  ymin,
int *  xmax,
int *  ymax 
)

find deconposition level and its resolution size C.4.1 Mapping view-window requests to codestream image resolution and regions Note: only round-down implemented

Parameters
[in]maxlevmaximum decomposition level
[in,out]levdecomposition level pointer
[in,out]fxhorizontal frame size pointer
[in,out]fyvertical frame size pointer
[in,out]xminhorizontal image offset pointer
[in,out]yminvertical image offset pointer
[in,out]xmaxhorizontal image size pointer
[in,out]ymaxvertical image size pointer

References FCGI_stderr, and find_level().

Referenced by comp_decomplev(), find_level(), and map_viewin2imgreg().

◆ map_viewin2imgreg()

imgreg_param_t map_viewin2imgreg ( const int  fx,
const int  fy,
const int  rx,
const int  ry,
const int  rw,
const int  rh,
const int  XOsiz,
const int  YOsiz,
const int  Xsiz,
const int  Ysiz,
const int  numOfreslev 
)

map view-window requests to codestream image resolutions and regions

Parameters
[in]fx,fyframe size
[in]rx,ryoffset of region
[in]rw,rhsize of region
[in]XOsiz,YOsizoffset from the origin of the reference grid to the left side of the image area
[in]Xsiz,Ysizsize of the reference grid
[in]numOfreslevnumber of resolution levels
Returns
structure of image region parameters

References FCGI_stdout, find_level(), imgreg_param::fx, imgreg_param::fy, imgreg_param::level, imgreg_param::ox, imgreg_param::oy, imgreg_param::sx, imgreg_param::sy, imgreg_param::xosiz, and imgreg_param::yosiz.

Referenced by enqueue_imagedata().

◆ print_imgreg()

void print_imgreg ( imgreg_param_t  imgreg)

print image region parameters

Parameters
[in]imgregimage region structure of parameters

References imgreg_param::fx, imgreg_param::fy, imgreg_param::level, logstream, imgreg_param::ox, imgreg_param::oy, imgreg_param::sx, and imgreg_param::sy.