⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 kdu_params.h

📁 该源码是JPEG2000的c++源代码,希望对研究JPEG2000标准以及编解码的朋友们有用.
💻 H
📖 第 1 页 / 共 4 页
字号:
  // Cluster name#define SIZ_params "SIZ"  // Attributes recorded in the SIZ marker segment#define Ssize "Ssize" // One record x "II"#define Sorigin "Sorigin" // One record x "II"#define Stiles "Stiles" // One record x "II"#define Stile_origin "Stile_origin" // One record x "II"#define Scomponents "Scomponents" // One record x "I"#define Ssigned "Ssigned" // Multiple records x "B"#define Sprecision "Sprecision" // Multiple records x "I"#define Ssampling "Ssampling" // Multiple records x "II"  // Attributes available only during content creation.#define Sdims "Sdims" // Multiple records x "II"class siz_params: public kdu_params {  public: // Member functions    KDU_EXPORT      siz_params();    virtual kdu_params *new_instance() { return NULL; }    virtual void finalize();      /* This function should be called once all available dimension         information has been supplied to the object, either by parsing         command line arguments, reading markers, or reading image file         headers.  The function verifies the consistency of all available         dimension information and derives and sets any dimensions which         have not otherwise been set.  For example, we may start with a         collection of individual component dimensions (set using the `Sdims'         attribute), from which the function must deduce an appropriate         set of canvas dimensions and sub-sampling parameters.  The function         does its best to handle all combinations of inputs.  It generates         an error if insufficient or conflicting information prevent it from         determining a full set of consistent dimensions. */  protected: // Member functions    virtual void copy_with_xforms(kdu_params *source, int skip_components,                   int discard_levels, bool transpose, bool vflip, bool hflip);    virtual int write_marker_segment(kdu_output *out, kdu_params *last_marked,                                     int tpart_idx);    virtual bool read_marker_segment(kdu_uint16 code, int num_bytes,                                     kdu_byte bytes[], int tpart_idx);  };  /* Notes:        Although the JPEG2000 SIZ marker cannot represent negative coordinates,     it is particularly convenient to allow this object to store and report     negative coordinates.  These should not trouble applications which     interface with it, since all of the algebraic properties of the coorinate     system still hold. Negative coordinates will be converted into appropriate     non-negative coordinates only when a valid marker segment must be written     out -- to do this the `write_marker_segment' function must examine various     `cod_params' attributes from every tile-component in the image to     determine appropriate offsets to the negative coordinates which will not     alter the interpretation of the canvas coordinate system.        For the above reason, you should avoid writing out a SIZ marker segment     until all code-stream parameters have been finalized for all tiles and     tile-components. *//*****************************************************************************//*                                   cod_params                              *//*****************************************************************************/  // Cluster name#define COD_params "COD"  // Attributes recorded in COD marker segments#define Cycc "Cycc" // One record x "B"#define Clayers "Clayers" // One record x "I"#define Cuse_sop "Cuse_sop" // One record x "B"#define Cuse_eph "Cuse_eph" // One record x "B"#define Corder "Corder" // One record x "(LRCP=0,RLCP=1,RPCL=2,PCRL=3,CPRL=4)"#define Calign_blk_last "Calign_blk_last" // One record x "BB"  // Attributes recorded in COD or COD marker segments#define Clevels "Clevels" // One record x "I"#define Creversible "Creversible" // One record x "B"#define Ckernels "Ckernels" // One record x "(W9X7=0,W5X3=1)"#define Cuse_precincts "Cuse_precincts" // One record x "B"#define Cprecincts "Cprecincts" // Multiple records x "II"#define Cblk "Cblk" // One record x "II"#define Cmodes "Cmodes" // One record x "[BYPASS=1|RESET=2|RESTART=4|CAUSAL=8|ERTERM=16|SEGMARK=32]"  // Attributes available only during content creation.#define Clev_weights "Clev_weights" // Multiple records x "F"#define Cband_weights "Cband_weights" // Multiple records x "F"  // Values for the "Corder" attribute#define Corder_LRCP    ((int) 0)#define Corder_RLCP    ((int) 1)#define Corder_RPCL    ((int) 2)#define Corder_PCRL    ((int) 3)#define Corder_CPRL    ((int) 4)  // Values for the "Ckernels" attribute#define Ckernels_W9X7  ((int) 0)#define Ckernels_W5X3  ((int) 1)  // Values for the "Cmodes" attribute#define Cmodes_BYPASS  ((int) 1)#define Cmodes_RESET   ((int) 2)#define Cmodes_RESTART ((int) 4)#define Cmodes_CAUSAL  ((int) 8)#define Cmodes_ERTERM  ((int) 16)#define Cmodes_SEGMARK ((int) 32)class cod_params: public kdu_params {  public: // Member Functions    KDU_EXPORT      cod_params();    virtual kdu_params *new_instance() { return NULL; }    virtual void finalize();  protected: // Member functions    virtual void copy_with_xforms(kdu_params *source, int skip_components,                   int discard_levels, bool transpose, bool vflip, bool hflip);    virtual int write_marker_segment(kdu_output *out, kdu_params *last_marked,                                     int tpart_idx);    virtual bool read_marker_segment(kdu_uint16 code, int num_bytes,                                     kdu_byte bytes[], int tpart_idx);  };/*****************************************************************************//*                                   qcd_params                              *//*****************************************************************************/  // Cluster name#define QCD_params "QCD"  // Attributes recorded in QCD/QCC marker segments#define Qguard "Qguard" // One record x "I"#define Qderived "Qderived" // One record x "B"#define Qabs_steps "Qabs_steps" // Multiple records x "F"; No resizing#define Qabs_ranges "Qabs_ranges" // Multiple records x "I"; No resizing  // Attributes available only during content creation.#define Qstep "Qstep" // One record x "F"class qcd_params: public kdu_params {  public: // Member Functions    KDU_EXPORT      qcd_params();    virtual kdu_params *new_instance() { return NULL; }    virtual void finalize();  protected: // Member functions    virtual void copy_with_xforms(kdu_params *source, int skip_components,                   int discard_levels, bool transpose, bool vflip, bool hflip);    virtual int write_marker_segment(kdu_output *out, kdu_params *last_marked,                                     int tpart_idx);    virtual bool read_marker_segment(kdu_uint16 code, int num_bytes,                                     kdu_byte bytes[], int tpart_idx);  };/*****************************************************************************//*                                   rgn_params                              *//*****************************************************************************/  // Cluster name#define RGN_params "RGN"  // Attributes recorded in RGN marker segments#define Rshift "Rshift" // One record x "I"  // Attributes available only during content creation.#define Rlevels "Rlevels" // One record x "I"#define Rweight "Rweight" // One record x "F"class rgn_params: public kdu_params {  public: // Member Functions.    KDU_EXPORT      rgn_params();    virtual kdu_params *new_instance() { return NULL; }    virtual void finalize();  protected: // Member functions    virtual void copy_with_xforms(kdu_params *source, int skip_components,                   int discard_levels, bool transpose, bool vflip, bool hflip);    virtual int write_marker_segment(kdu_output *out, kdu_params *last_marked,                                     int tpart_idx);    virtual bool read_marker_segment(kdu_uint16 code, int num_bytes,                                     kdu_byte bytes[], int tpart_idx);  };/*****************************************************************************//*                                   poc_params                              *//*****************************************************************************/  // Cluster name#define POC_params "POC"  // Attributes recorded in POC marker segments#define Porder "Porder" // Multiple records x "IIIII(LRCP=0,RLCP=1,RPCL=2,PCRL=3,CPRL=4)"class poc_params: public kdu_params {  public: // Member Functions    KDU_EXPORT      poc_params();    kdu_params *new_instance()      { if (tile_idx < 0) return NULL;        kdu_params *result = new poc_params();        return result->link(this,tile_idx,comp_idx); }  protected: // Member functions    virtual void copy_with_xforms(kdu_params *source, int skip_components,                   int discard_levels, bool transpose, bool vflip, bool hflip);    virtual int write_marker_segment(kdu_output *out, kdu_params *last_marked,                                     int tpart_idx);    virtual bool read_marker_segment(kdu_uint16 code, int num_bytes,                                     kdu_byte bytes[], int tpart_idx);  };/*****************************************************************************//*                                   crg_params                              *//*****************************************************************************/  // Cluster name#define CRG_params "CRG"  // Attributes recorded in the CRG marker segment#define CRGoffset "CRGoffset" // Multiple records x "FF"class crg_params: public kdu_params {  public: // Member Functions    KDU_EXPORT      crg_params();    kdu_params *new_instance() { return NULL; }  protected: // Member functions    virtual void copy_with_xforms(kdu_params *source, int skip_components,                   int discard_levels, bool transpose, bool vflip, bool hflip);    virtual int write_marker_segment(kdu_output *out, kdu_params *last_marked,                                     int tpart_idx);    virtual bool read_marker_segment(kdu_uint16 code, int num_bytes,                                     kdu_byte bytes[], int tpart_idx);  };#endif // KDU_PARAMS_H

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -