pdmark / openjpeg

Automatically exported from code.google.com/p/openjpeg
Other
0 stars 0 forks source link

Need public function to tell kernel type used (5x3 vs 9x7) #3

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
 AFAIK j2k.h and jp2.h header files are not installed on a standard
openjpeg installation. Is this intended ?
  Here is the issue I am currently facing, in order to reject lossy
JP2/J2K stream in clinical trial environment I had to code the
following:

  int reversible;
  opj_j2k_t* j2k = NULL;
  opj_jp2_t* jp2 = NULL;

  switch(parameters.decod_format)
    {
  case J2K_CFMT:
    j2k = (opj_j2k_t*)dinfo->j2k_handle;
    assert( j2k );
    reversible = j2k->cp->tcps->tccps->qmfbid;
    break;
  case JP2_CFMT:
    jp2 = (opj_jp2_t*)dinfo->jp2_handle;
    assert( jp2 );
    reversible = jp2->j2k->cp->tcps->tccps->qmfbid;
    break;
  default:
    gdcmErrorMacro( "Impossible happen" );
    return false;
    }
  LossyFlag = !reversible;

Unfortunately I need to include j2k.h  / jp2.h which is completely
non-standard on linux distribution.

What other people recommend for this situation:

- Extend openjpeg installation mechanism to install j2k.h / jp2.h
- Extend openjpeg.h API to return the reversible flag.

Thanks for suggestion 

Original issue reported on code.google.com by mathieu.malaterre on 8 Jun 2009 at 8:33

GoogleCodeExporter commented 9 years ago
Ref:
http://groups.google.com/group/openjpeg/browse_thread/thread/7c80e293e80fa931

Original comment by mathieu.malaterre on 8 Jun 2009 at 8:33

GoogleCodeExporter commented 9 years ago
Issue is still current in 2012:
http://groups.google.com/group/openjpeg/browse_thread/thread/af13483b979b77b8

Original comment by mathieu.malaterre on 11 Jan 2012 at 7:11

GoogleCodeExporter commented 9 years ago
Following the norm, each tile-component can be coded with is own transformation 
(reversible or irreversible) so is quite difficult to have one unique function: 
cf markers COD and COC

Original comment by savmick...@gmail.com on 13 Nov 2012 at 12:58

GoogleCodeExporter commented 9 years ago

Original comment by mathieu.malaterre on 25 Feb 2014 at 3:19

GoogleCodeExporter commented 9 years ago

Original comment by mathieu.malaterre on 27 Feb 2014 at 8:04

GoogleCodeExporter commented 9 years ago

Original comment by savmick...@gmail.com on 6 Mar 2014 at 11:43

GoogleCodeExporter commented 9 years ago
Creating a fake irreversible image:

$ kdu_compress -no_info -i lena512.pgm -o lena512.j2k Ckernels:T0C0=W5X3

Original comment by mathieu.malaterre on 14 Mar 2014 at 1:11

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r2740.

Original comment by mathieu.malaterre on 14 Mar 2014 at 1:53

GoogleCodeExporter commented 9 years ago
Funky one:
$ kdu_compress -no_info -i lena512.pgm -o lena512.j2k Ckernels:T2C0=W9X7 
"Stiles={256,256}" Ckernels:T1C0=W5X3

Original comment by mathieu.malaterre on 14 Mar 2014 at 1:54

GoogleCodeExporter commented 9 years ago
More fun:
$ kdu_compress -no_info -i lena512.pgm -o lena512.j2k Ckernels:T2C0=W9X7 
"Stiles={256,256}" Ckernels:T1C0=W5X3 Clevels:T1C0=0 Cuse_sop:T2=yes 
Cprecincts:T0="{128,128}"

Original comment by mathieu.malaterre on 14 Mar 2014 at 2:00

GoogleCodeExporter commented 9 years ago

Original comment by mathieu.malaterre on 14 Mar 2014 at 2:02