## schrovideoformat

schrovideoformat

## Synopsis

    int                 schro_video_format_validate         (SchroVideoFormat *format);
    void                schro_video_format_set_std_video_format
                                                            (SchroVideoFormat *format,
                                                             SchroVideoFormatEnum index);
    SchroVideoFormatEnum schro_video_format_get_std_video_format
                                                            (SchroVideoFormat *format);
    void                schro_video_format_set_std_frame_rate
                                                            (SchroVideoFormat *format,
                                                             int index);
    int                 schro_video_format_get_std_frame_rate
                                                            (SchroVideoFormat *format);
    void                schro_video_format_set_std_aspect_ratio
                                                            (SchroVideoFormat *format,
                                                             int index);
    int                 schro_video_format_get_std_aspect_ratio
                                                            (SchroVideoFormat *format);
    void                schro_video_format_set_std_signal_range
                                                            (SchroVideoFormat *format,
                                                             SchroSignalRange index);
    SchroSignalRange    schro_video_format_get_std_signal_range
                                                            (SchroVideoFormat *format);
    void                schro_video_format_set_std_colour_spec
                                                            (SchroVideoFormat *format,
                                                             SchroColourSpec index);
    SchroColourSpec     schro_video_format_get_std_colour_spec
                                                            (SchroVideoFormat *format);

## Description

## Details

### schro_video_format_validate ()

    int                 schro_video_format_validate         (SchroVideoFormat *format);

### schro_video_format_set_std_video_format ()

    void                schro_video_format_set_std_video_format
                                                            (SchroVideoFormat *format,
                                                             SchroVideoFormatEnum index);

Initializes the video format structure pointed to by `format` to the standard Dirac video formats specified by `index`.

### schro_video_format_get_std_video_format ()

    SchroVideoFormatEnum schro_video_format_get_std_video_format
                                                            (SchroVideoFormat *format);

In Dirac streams, video formats are encoded by specifying a standard format, and then modifying that to get the desired video format. This function guesses a standard format to use as a starting point for encoding the video format pointed to by `format`.

`format` : | pointer to SchroVideoFormat structure
Returns : | an index to the optimal standard format

### schro_video_format_set_std_frame_rate ()

    void                schro_video_format_set_std_frame_rate
                                                            (SchroVideoFormat *format,
                                                             int index);

Sets the frame rate of the video format structure pointed to by `format` to the Dirac standard frame specified by `index`.

### schro_video_format_get_std_frame_rate ()

    int                 schro_video_format_get_std_frame_rate
                                                            (SchroVideoFormat *format);

In Dirac bitstreams, frame rates can be one of several standard frame rates, encoded as an index, or the numerator and denominator of the framerate can be encoded directly. This function looks up the frame rate contained in the video format structure `format` in the list of standard frame rates. If the frame rate is a standard frame rate, the corresponding index is returned, otherwise 0 is returned.

Returns : | index to a standard Dirac frame rate, or 0 if the frame rate is custom.

### schro_video_format_set_std_aspect_ratio ()

    void                schro_video_format_set_std_aspect_ratio
                                                            (SchroVideoFormat *format,
                                                             int index);

### schro_video_format_get_std_aspect_ratio ()

    int                 schro_video_format_get_std_aspect_ratio
                                                            (SchroVideoFormat *format);

### schro_video_format_set_std_signal_range ()

    void                schro_video_format_set_std_signal_range
                                                            (SchroVideoFormat *format,
                                                             SchroSignalRange index);

Sets the signal range of the video format structure to one of the standard values indicated by `index`.

### schro_video_format_get_std_signal_range ()

    SchroSignalRange    schro_video_format_get_std_signal_range
                                                            (SchroVideoFormat *format);

In Dirac bitstreams, signal ranges can be one of several standard signal ranges, encoded as an index, or the extents of the signal range can be encoded directly. This function looks up the signal range contained in the video format structure `format` in the list of standard signal ranges. If the signal range is a standard signal range, the corresponding index is returned, otherwise 0 is returned.

`format` : | pointer to SchroVideoFormat structure
Returns : | index to standard signal range, or 0 if there is no corresponding standard signal range.

### schro_video_format_set_std_colour_spec ()

    void                schro_video_format_set_std_colour_spec
                                                            (SchroVideoFormat *format,
                                                             SchroColourSpec index);

Sets the colour specification of the video format structure to one of the standard values indicated by `index`.

`format` : | pointer to SchroVideoFormat structure
`index` : | index to standard colour specification

### schro_video_format_get_std_colour_spec ()

    SchroColourSpec     schro_video_format_get_std_colour_spec
                                                            (SchroVideoFormat *format);

In Dirac bitstreams, colour specifications can be one of several standard colour specifications, encoded as an index, or the individual parts of the colour specication can be encoded. This function looks up the colour specification contained in the video format structure `format` in the list of standard colour specifications. If the colour specification is a standard colour specification, the corresponding index is returned, otherwise 0 is returned.

`format` : | pointer to SchroVideoFormat structure
Returns : | index to standard colour specification, or 0 if there is no corresponding standard colour specification.