Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

Low level header functions on single components
[Low level access to single components]


Detailed Description

Remarks:
Typically used after all other header settings are correct.

Do use p_get_comp_buffer_size() to determine buffer sizes. The functions support subsample factors which are not a multiple of the file image size. The component size is rounded UP.


Functions

int p_mod_add_comp (pT_header *header)
int p_get_comp_by_name (const pT_header *header, const char *name)
int p_get_num_comps (const pT_header *header)
pT_status p_mod_set_comp_2 (pT_header *header, const int comp, const char *name, const pT_data_fmt file_data_fmt, const int pix_subsample, const int line_subsample, const int multiplex_factor)
pT_status p_mod_rm_comp (pT_header *header, const int comp)
pT_status p_mod_rm_extra_comps (pT_header *header)
pT_status p_get_comp_2 (const pT_header *header, const int comp, char *name, pT_data_fmt *file_data_fmt, int *pix_subsample, int *line_subsample, int *multiplex_factor)
pT_status p_get_comp_buffer_size (const pT_header *header, const int comp, int *width, int *height)


Function Documentation

int p_mod_add_comp pT_header header  ) 
 

Add a component to the header structure

  • Component properties need to be set by p_mod_comp()
    Returns:
    component id.

    -1 if pfspd header full

int p_get_comp_by_name const pT_header header,
const char *  name
 

Uses the name to find the component id in header Returns -1 if not found

int p_get_num_comps const pT_header header  ) 
 

Returns the total number of components from the header

pT_status p_mod_set_comp_2 pT_header header,
const int  comp,
const char *  name,
const pT_data_fmt  file_data_fmt,
const int  pix_subsample,
const int  line_subsample,
const int  multiplex_factor
 

Sets all properties of comp in header The multiplex factor is typically 1 for Y, 2 for U/V.

pT_status p_mod_rm_comp pT_header header,
const int  comp
 

Remove a comp from header

  • Shall only be used for extra components
  • No operation for component id -1

pT_status p_mod_rm_extra_comps pT_header header  ) 
 

Remove all "extra" components from header

pT_status p_get_comp_2 const pT_header header,
const int  comp,
char *  name,
pT_data_fmt file_data_fmt,
int *  pix_subsample,
int *  line_subsample,
int *  multiplex_factor
 

Retrieves all properties of component comp from header name string allocated by caller, length: P_SCOM_CODE+1 Any output parameters may be NULL (no value returned)

pT_status p_get_comp_buffer_size const pT_header header,
const int  comp,
int *  width,
int *  height
 

Return height and width of comp buffer. This is the minimum size of a buffer that can be used by the read/write field/frame functions.

  • For interlaced files this is the size of a field.
  • For progressive files this is the size of a frame.


Generated on Thu Nov 19 16:28:20 2009 for cpfspd by  doxygen 1.3.9.1