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

Functions operating on pfspd header
[PFSPD header]


Modules

group  Modify header.
group  Extract information from header.

Functions

pT_status p_check_header (const pT_header *header)
pT_status p_read_header (const char *filename, pT_header *header)
pT_status p_write_header (const char *filename, pT_header *header)
pT_status p_rewrite_header (const char *filename, pT_header *header)
pT_status p_copy_header (pT_header *new_header, const pT_header *header)
pT_status p_print_header (const pT_header *header, FILE *stream)
pT_status p_create_header (pT_header *header, pT_color color, pT_freq image_freq)
pT_status p_create_ext_header (pT_header *header, pT_color color, pT_freq image_freq, pT_size image_size, int pixels_per_line, int progressive, pT_asp_rat ratio)


Function Documentation

pT_status p_check_header const pT_header header  ) 
 

Check validity of header (color format, data format & relative component sizes).

Returns:
P_OK on valid header.

Error code on invalid header.

Remarks:
This function is also implicitly called by the following functions:

pT_status p_read_header const char *  filename,
pT_header header
 

Read header from filename specified and store result in header.

pT_status p_write_header const char *  filename,
pT_header header
 

Create new pfspd file based on specification of header.

Remarks:
Space for the number of images specified in header is allocated on disk.

pT_status p_rewrite_header const char *  filename,
pT_header header
 

Remarks:
Can only execute on existing pfspd file (not on stdio)

Typical use: replace the file description

  • Main header fields that may be modified:
    • description
    • appl_type
    • bytes_rec
    • ima_freq
    • lin_freq
    • pix_freq
    • h_pp_size
    • v_pp_size
  • Component header fields that may be modified:
    • tem_sbsmpl
    • lin_sbsmpl
    • pix_sbsmpl
    • tem_phshft
    • lin_phshft
    • pix_phshft
    • com_code

pT_status p_copy_header pT_header new_header,
const pT_header header
 

Copy header to new_header

Remarks:
This is required when one wants to use a header that is read from a file as a template for a new file that will be written to disk; internally there is bookkeeping in the header structure.

pT_status p_print_header const pT_header header,
FILE *  stream
 

Print contents of header to stream (can be file, stdout or stderr) in a human readable format.

pT_status p_create_header pT_header header,
pT_color  color,
pT_freq  image_freq
 

  • Standard definition, interlaced, 4:3 aspect ratio (note that this is the 'normal case', otherwise use p_create_ext_header).
  • Image frequency as specified in image_freq (P_50HZ, P_60HZ, P_REAL_60HZ, P_24HZ, P_REAL_24HZ, P25HZ, P_30HZ & P_REAL_30HZ are allowed).
  • Color format as specified in color (note that P_STREAM is only supported for P_25HZ & P_30HZ).
  • Number of images is set to zero.
  • Data format = P_8_BIT_FILE.

See further Supported combinations of color format, image frequency & image size

pT_status p_create_ext_header pT_header header,
pT_color  color,
pT_freq  image_freq,
pT_size  image_size,
int  pixels_per_line,
int  progressive,
pT_asp_rat  ratio
 

This is an extended form of p_create_header().

  • SD & HD sizes; image size as specified in image_size & pixels_per_line. If pixels_per_line is zero, a default value of pixels per line will be set.
  • Aspect ratio is set as in aspect_ratio. When value P_UNKNOWN_ASPECT_RATIO is used, the choise between 16:9 and 4:3 is automatically determined according to the rules described in Aspect ratio .
  • If progressive==0 the file is interlaced, otherwise it is progressive.
  • Image frequency as specified in image_freq (P_50HZ, P_60HZ, P_REAL_60HZ, P_24HZ, P_REAL_24HZ, P25HZ, P_30HZ & P_REAL_30HZ are allowed).
  • Color format as specified in color (note that P_STREAM is only supported for P_25HZ & P_30HZ).
  • Number of images is set to zero.
  • Data format = P_8_BIT_FILE.

See further Supported combinations of color format, image frequency & image size


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