schroparams

## schroparams schroparams |

## Synopsis

                        SchroVideoFormat;
                        SchroParams;
                        SchroMotionVector;
                        SchroMotionField;
                        SchroMotionVectorDC;
                        SchroGlobalMotion;
    typedef             SchroPictureNumber;
    void                schro_params_calculate_iwt_sizes    (SchroParams *params);
    void                schro_params_calculate_mc_sizes     (SchroParams *params);
    int                 schro_params_set_block_params       (SchroParams *params,
                                                             int index);
    void                schro_params_set_default_codeblock  (SchroParams *params);
    int                 schro_params_get_block_params       (SchroParams *params);
    int                 schro_params_get_frame_format       (int depth,
                                                             SchroChromaFormat chroma_format);
    void                schro_params_init                   (SchroParams *params,
                                                             int video_format);
    schro_bool          schro_params_is_default_codeblock   (SchroParams *params);
    schro_bool          schro_params_is_default_quant_matrix
                                                            (SchroParams *params);
    void                schro_params_set_default_quant_matrix
                                                            (SchroParams *params);
    int                 schro_params_verify_block_params    (SchroParams *params);

## Description

## Details

### SchroVideoFormat

    typedef struct {
      SchroVideoFormatEnum index;
      int width;
      int height;
      SchroChromaFormat chroma_format;

      schro_bool interlaced;
      schro_bool top_field_first;

      int frame_rate_numerator;
      int frame_rate_denominator;
      int aspect_ratio_numerator;
      int aspect_ratio_denominator;

      int clean_width;
      int clean_height;
      int left_offset;
      int top_offset;

      int luma_offset;
      int luma_excursion;
      int chroma_offset;
      int chroma_excursion;

      SchroColourPrimaries colour_primaries;
      SchroColourMatrix colour_matrix;
      SchroTransferFunction transfer_function;

      int interlaced_coding;

      int unused0;
      int unused1;
      int unused2;
    } SchroVideoFormat;

### SchroParams

    typedef struct {
    } SchroParams;

### SchroMotionVector

    typedef struct {
      unsigned int pred_mode : 2;
      unsigned int using_global : 1;
      unsigned int split : 2;
      unsigned int unused : 3;
      unsigned int scan : 8;
      unsigned int metric : 16;
      int16_t dx[2];
      int16_t dy[2];
    } SchroMotionVector;

### SchroMotionField

    typedef struct {
      int x_num_blocks;
      int y_num_blocks;
      SchroMotionVector *motion_vectors;
    } SchroMotionField;

### SchroMotionVectorDC

    typedef struct {
      unsigned int pred_mode : 2;
      unsigned int using_global : 1;
      unsigned int split : 2;
      unsigned int unused : 3;
      unsigned int scan : 8;
      unsigned int metric : 16;
      int16_t dc[3];
      uint16_t _padding1;
    } SchroMotionVectorDC;

### SchroGlobalMotion

    typedef struct {
      int b0;
      int b1;
      int a_exp;
      int a00;
      int a01;
      int a10;
      int a11;
      int c_exp;
      int c0;
      int c1;
    } SchroGlobalMotion;

### SchroPictureNumber

    typedef uint32_t SchroPictureNumber;

### schro_params_calculate_iwt_sizes ()

    void                schro_params_calculate_iwt_sizes    (SchroParams *params);

Calculates the size of the array used for wavelet transformation using the current video format and transformation depth in the `params` structure. The `params` structure is updated with the new values.

The structure fields changed are: iwt_chroma_width, iwt_chroma_height, iwt_luma_width, iwt_luma_height.

`params` : | pointer to `SchroParams` structure

### schro_params_calculate_mc_sizes ()

    void                schro_params_calculate_mc_sizes     (SchroParams *params);

Calculates the size of the array used for motion compensation using the current video format and motion compensation paramters in the `params` structure. The `params` structure is updated with the new values.

The structure fields changed are: x_num_blocks, y_num_blocks, mc_luma_width, mc_luma_height, mc_chroma_width, mc_chroma_height, x_offset, y_offset.

`params` : | pointer to `SchroParams` structure

### schro_params_set_block_params ()

    int                 schro_params_set_block_params       (SchroParams *params,
                                                             int index);

Sets the block parameters for motion compensation in the parameters structure pointed to by `params` to the standard block parameters given by `index`.

`params` : | pointer to SchroParams structure
`index` : | index to standard block parameters
Returns : |

### schro_params_set_default_codeblock ()

    void                schro_params_set_default_codeblock  (SchroParams *params);

Sets the codeblock parameters in the parameters structure pointed to by `params` to the defaults.

`params` : | pointer to SchroParams structure

### schro_params_get_block_params ()

    int                 schro_params_get_block_params       (SchroParams *params);

`params` : |
Returns : |

### schro_params_get_frame_format ()

    int                 schro_params_get_frame_format       (int depth,
                                                             SchroChromaFormat chroma_format);

`depth` : |
`chroma_format` : |
Returns : |

### schro_params_init ()

    void                schro_params_init                   (SchroParams *params,
                                                             int video_format);

`params` : |
`video_format` : |

### schro_params_is_default_codeblock ()

    schro_bool          schro_params_is_default_codeblock   (SchroParams *params);

`params` : | pointer to SchroParams structure
Returns : | True if the codeblocks in `params` are the default codeblocks.

### schro_params_is_default_quant_matrix ()

    schro_bool          schro_params_is_default_quant_matrix
                                                            (SchroParams *params);

`params` : |
Returns : |

### schro_params_set_default_quant_matrix ()

    void                schro_params_set_default_quant_matrix
                                                            (SchroParams *params);

`params` : |

### schro_params_verify_block_params ()

    int                 schro_params_verify_block_params    (SchroParams *params);

`params` : |
Returns : |