Alien-FreeImage

 view release on metacpan or  search on metacpan

src/Source/LibOpenJPEG/pi.c  view on Meta::CPAN

	OPJ_UINT32 l_poc_bound;

    OPJ_ARG_NOT_USED(p_max_res);

	/* preconditions in debug*/
	assert(p_cp != 00);
	assert(p_tileno < p_cp->tw * p_cp->th);

	/* initializations*/
	l_tcp = &p_cp->tcps [p_tileno];
	/* number of iterations in the loop */
	l_poc_bound = l_tcp->numpocs+1;

	/* start at first element, and to make sure the compiler will not make a calculation each time in the loop
	   store a pointer to the current element to modify rather than l_tcp->pocs[i]*/
	l_current_poc = l_tcp->pocs;

	l_current_poc->compS = l_current_poc->compno0;
	l_current_poc->compE = l_current_poc->compno1;
	l_current_poc->resS = l_current_poc->resno0;
	l_current_poc->resE = l_current_poc->resno1;

src/Source/LibOpenJPEG/pi.c  view on Meta::CPAN

	/* number of pocs*/
	OPJ_UINT32 l_poc_bound;

	/* preconditions in debug*/
	assert(p_cp != 00);
	assert(p_tileno < p_cp->tw * p_cp->th);

	/* initializations*/
	l_tcp = &p_cp->tcps [p_tileno];

	/* number of iterations in the loop */
	l_poc_bound = l_tcp->numpocs+1;

	/* start at first element, and to make sure the compiler will not make a calculation each time in the loop
	   store a pointer to the current element to modify rather than l_tcp->pocs[i]*/
	l_current_poc = l_tcp->pocs;

	for (pino = 0; pino < l_poc_bound ; ++pino) {
		l_current_poc->compS = 0;
		l_current_poc->compE = p_num_comps;/*p_image->numcomps;*/
		l_current_poc->resS = 0;

src/Source/LibRawLite/internal/dcb_demosaicing.c  view on Meta::CPAN

}

free(image2);

}




// DCB demosaicing main routine
void CLASS dcb(int iterations, int dcb_enhance)
{


	int i=1;
	
	float (*image2)[3];
	image2 = (float (*)[3]) calloc(width*height, sizeof *image2);

	float (*image3)[3];
	image3 = (float (*)[3]) calloc(width*height, sizeof *image3);

src/Source/LibRawLite/internal/dcb_demosaicing.c  view on Meta::CPAN

  		
 		dcb_ver(image3);
 		dcb_color3(image3);
  		
 		dcb_decide(image2, image3);

		free(image3);

		dcb_copy_to_buffer(image2);

		while (i<=iterations)
		{
#ifdef DCRAW_VERBOSE
			if (verbose) fprintf (stderr,_("DCB correction pass %d...\n"), i);
#endif                        
			dcb_nyquist();
			dcb_nyquist();
			dcb_nyquist();
			dcb_map();
			dcb_correction();	
			i++;

src/Source/LibRawLite/internal/var_defines.h  view on Meta::CPAN

#define filtering_mode (imgdata.params.filtering_mode)

// Demosaic packs
//AFD
//#define afd_noise_att				(imgdata.params.afd_noise_att)
//#define afd_noise_thres				(imgdata.params.afd_noise_thres)
//#define afd_luminance_passes		(imgdata.params.afd_luminance_passes)
//#define afd_chrominance_method		(imgdata.params.afd_chrominance_method)
//#define afd_luminance_only			(imgdata.params.afd_luminance_only)
// DCB
#define dcb_iterations   (imgdata.params.iterations)
#define dcb_enhance_fl   (imgdata.params.dcb_enhance)
#define fbdd_noiserd     (imgdata.params.fbdd_noiserd)
// VCD
#define eeci_refine    (imgdata.params.eeci_refine)
#define es_med_passes  (imgdata.params.es_med_passes)



//rgb_constants
#define xyz_rgb         (rgb_constants.xyz_rgb)

src/Source/LibRawLite/libraw/libraw.h  view on Meta::CPAN

    void        xtrans_interpolate(int);
    void        ahd_interpolate();
    void        dht_interpolate();
    void        aahd_interpolate();

    /* from demosaic pack */
    void        ahd_interpolate_mod();
    void        afd_interpolate_pl(int afd_passes, int clip_on);
    void        afd_noise_filter_pl();
    void	lmmse_interpolate(int gamma_apply);
    void        dcb(int iterations, int dcb_enhance);
    void        fbdd(int noiserd);
    void        vcd_interpolate(int ahd_cutoff);
    void        amaze_demosaic_RT();
    void	exp_bef(float expos, float preser);
    void        CA_correct_RT(float cared, float cablue);
    void        cfa_linedn(float linenoise);
    void        cfa_impulse_gauss(float lclean, float cclean);
    void        green_equilibrate(float thresh);
	
    /* demosaic pack end */

src/Source/LibRawLite/libraw/libraw_types.h  view on Meta::CPAN

    int		user_cblack[4];
    int         user_sat;       /* -S */

    int         med_passes;     /* -m */
    float       auto_bright_thr;
    float       adjust_maximum_thr;
    int         no_auto_bright; /* -W */
    int         use_fuji_rotate;/* -j */
    int         green_matching;
    /* DCB parameters */
    int         dcb_iterations;
    int         dcb_enhance_fl;
    int         fbdd_noiserd;
    /* VCD parameters */
    int         eeci_refine;
    int         es_med_passes;
    /* AMaZE*/
    int         ca_correc;
    float       cared;
    float	cablue;
    int cfaline;

src/Source/LibRawLite/src/libraw_cxx.cpp  view on Meta::CPAN

      if(!nonz)
        C.cblack[4] = C.cblack[5] = 0;
    }
  for(c=0;c<4;c++) C.cblack[c] += C.black;
}

int LibRaw::dcraw_process(void)
{
  int quality,i;

  int iterations=-1, dcb_enhance=1, noiserd=0;
  int eeci_refine_fl=0, es_med_passes_fl=0;
  float cared=0,cablue=0;
  float linenoise=0;
  float lclean=0,cclean=0;
  float thresh=0;
  float preser=0;
  float expos=1.0;


  CHECK_ORDER_LOW(LIBRAW_PROGRESS_LOAD_RAW);

src/Source/LibRawLite/src/libraw_cxx.cpp  view on Meta::CPAN

        !O.no_auto_scale)
      {
        scale_colors();
        SET_PROC_FLAG(LIBRAW_PROGRESS_SCALE_COLORS);
      }

    pre_interpolate();

    SET_PROC_FLAG(LIBRAW_PROGRESS_PRE_INTERPOLATE);

    if (O.dcb_iterations >= 0) iterations = O.dcb_iterations;
    if (O.dcb_enhance_fl >=0 ) dcb_enhance = O.dcb_enhance_fl;
    if (O.fbdd_noiserd >=0 ) noiserd = O.fbdd_noiserd;
    if (O.eeci_refine >=0 ) eeci_refine_fl = O.eeci_refine;
    if (O.es_med_passes >0 ) es_med_passes_fl = O.es_med_passes;

    // LIBRAW_DEMOSAIC_PACK_GPL3

    if (!O.half_size && O.cfa_green >0) {thresh=O.green_thresh ;green_equilibrate(thresh);}
    if (O.exp_correc >0) {expos=O.exp_shift ; preser=O.exp_preser; exp_bef(expos,preser);}
    if (O.ca_correc >0 ) {cablue=O.cablue; cared=O.cared; CA_correct_RT(cablue, cared);}

src/Source/LibRawLite/src/libraw_cxx.cpp  view on Meta::CPAN

        else if (quality == 2 && P1.filters > 1000)
          ppg_interpolate();
        else if (P1.filters == LIBRAW_XTRANS)
          {
            // Fuji X-Trans
            xtrans_interpolate(quality>2?3:1);
          }
        else if (quality == 3)
          ahd_interpolate(); // really don't need it here due to fallback op
        else if (quality == 4)
          dcb(iterations, dcb_enhance);
        //  LIBRAW_DEMOSAIC_PACK_GPL2
        else if (quality == 5)
          ahd_interpolate_mod();
        else if (quality == 6)
          afd_interpolate_pl(2,1);
        else if (quality == 7)
          vcd_interpolate(0);
        else if (quality == 8)
          vcd_interpolate(12);
        else if (quality == 9)

src/Source/LibWebP/src/enc/vp8enci.h  view on Meta::CPAN

  uint8_t yuv_mem_[3 * YUV_SIZE + PRED_SIZE + ALIGN_CST];  // memory for yuv_*
} VP8EncIterator;

  // in iterator.c
// must be called first
void VP8IteratorInit(VP8Encoder* const enc, VP8EncIterator* const it);
// restart a scan
void VP8IteratorReset(VP8EncIterator* const it);
// reset iterator position to row 'y'
void VP8IteratorSetRow(VP8EncIterator* const it, int y);
// set count down (=number of iterations to go)
void VP8IteratorSetCountDown(VP8EncIterator* const it, int count_down);
// return true if iteration is finished
int VP8IteratorIsDone(const VP8EncIterator* const it);
// Import uncompressed samples from source.
// If tmp_32 is not NULL, import boundary samples too.
// tmp_32 is a 32-bytes scratch buffer that must be aligned in memory.
void VP8IteratorImport(VP8EncIterator* const it, uint8_t* tmp_32);
// export decimated samples
void VP8IteratorExport(const VP8EncIterator* const it);
// go to next macroblock. Returns false if not finished.
int VP8IteratorNext(VP8EncIterator* const it);
// save the yuv_out_ boundary values to top_/left_ arrays for next iterations.
void VP8IteratorSaveBoundary(VP8EncIterator* const it);
// Report progression based on macroblock rows. Return 0 for user-abort request.
int VP8IteratorProgress(const VP8EncIterator* const it,
                        int final_delta_percent);
// Intra4x4 iterations
void VP8IteratorStartI4(VP8EncIterator* const it);
// returns true if not done.
int VP8IteratorRotateI4(VP8EncIterator* const it,
                        const uint8_t* const yuv_out);

// Non-zero context setup/teardown
void VP8IteratorNzToBytes(VP8EncIterator* const it);
void VP8IteratorBytesToNz(VP8EncIterator* const it);

// Helper functions to set mode properties

src/Source/LibWebP/src/utils/utils.quant_levels.c  view on Meta::CPAN

  for (i = 0; i < num_levels; ++i) {
    inv_q_level[i] = min_s + (double)(max_s - min_s) * i / (num_levels - 1);
  }

  // Fixed values. Won't be changed.
  q_level[min_s] = 0;
  q_level[max_s] = num_levels - 1;
  assert(inv_q_level[0] == min_s);
  assert(inv_q_level[num_levels - 1] == max_s);

  // k-Means iterations.
  for (iter = 0; iter < MAX_ITER; ++iter) {
    double q_sum[NUM_SYMBOLS] = { 0 };
    double q_count[NUM_SYMBOLS] = { 0 };
    int s, slot = 0;

    // Assign classes to representatives.
    for (s = min_s; s <= max_s; ++s) {
      // Keep track of the nearest neighbour 'slot'
      while (slot < num_levels - 1 &&
             2 * s > inv_q_level[slot] + inv_q_level[slot + 1]) {



( run in 3.046 seconds using v1.01-cache-2.11-cpan-96521ef73a4 )