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

cpfspd.h File Reference

Go to the source code of this file.

Data Structures

struct  pT_component
struct  pT_header

Enumerations

enum  pT_status {
  P_OK = 0, P_FILE_OPEN_FAILED = 100, P_FILE_CREATE_FAILED = 101, P_FILE_MODIFY_FAILED = 102,
  P_FILE_IS_NOT_PFSPD_FILE = 103, P_WRITE_FAILED = 110, P_READ_FAILED = 111, P_SEEK_FAILED = 112,
  P_NEGATIVE_SEEK_ON_STDIO = 113, P_WRITE_BEYOND_EOF_STDOUT = 115, P_REWRITE_ON_STDOUT = 116, P_REWRITE_MODIFIED_HEADER = 117,
  P_TOO_MANY_IMAGES = 199, P_TOO_MANY_COMPONENTS = 200, P_INVALID_COMPONENT = 201, P_NO_IH_RECORDS_ALLOWED = 202,
  P_ILLEGAL_BYTES_PER_REC = 203, P_ILLEGAL_TEM_SBSMPL = 204, P_INVALID_AUXILIARY = 205, P_ILLEGAL_LIN_SBSMPL = 206,
  P_ILLEGAL_PIX_SBSMPL = 207, P_SHOULD_BE_INTERLACED = 210, P_READ_CHR_FROM_LUM_ONLY = 211, P_READ_RGB_FROM_LUM_ONLY = 212,
  P_READ_PLANAR_CHR_FROM_MULT_CHR = 213, P_READ_RGB_FROM_YUV = 214, P_READ_CHR_FROM_RGB = 215, P_READ_CHR_FROM_STREAM = 216,
  P_READ_RGB_FROM_STREAM = 217, P_READ_INVALID_COMPONENT = 218, P_WRITE_INVALID_COMPONENT = 219, P_WRONG_LUM_COMP_SIZE = 220,
  P_WRONG_CHR_COMP_SIZE = 221, P_WRONG_RGB_COMP_SIZE = 222, P_WRONG_STREAM_COMP_SIZE = 223, P_WRONG_XYZ_COMP_SIZE = 224,
  P_EXCEEDING_DESCRIPTION_SIZE = 225, P_WRONG_EXTRA_COMP_SIZE = 226, P_WRONG_SUBSAMPLE_FACTOR = 227, P_EXCEEDING_AUXILIARY_DATA_SIZE = 228,
  P_EXCEEDING_AUXILIARY_HDR_SIZE = 229, P_HEADER_IS_MODIFIED = 230, P_INCOMP_MULT_COLOR_FORMAT = 242, P_INCOMP_PLANAR_COLOR_FORMAT = 243,
  P_ILLEGAL_COLOR_FORMAT = 300, P_ILLEGAL_IMAGE_FREQUENCY = 400, P_ILLEGAL_IMAGE_FREQ_MOD = 410, P_ILLEGAL_ILP_FREQ_MOD = 420,
  P_ILLEGAL_IMAGE_SIZE = 500, P_ILLEGAL_INTERLACE = 501, P_ILLEGAL_COMP_SIZE = 502, P_ILLEGAL_PHSHFT = 503,
  P_ILLEGAL_ASPECT_RATIO = 600, P_ILLEGAL_SIZE_FREQUENCY = 700, P_ILLEGAL_SIZE_INTERLACED_MODE = 701, P_ILLEGAL_SIZE_PROGRESSIVE_MODE = 702,
  P_ILLEGAL_FORMAT_INTERL_MODE = 703, P_ILLEGAL_NUM_OF_PIX_PER_LINE = 710, P_ILLEGAL_FILE_DATA_FORMAT = 800, P_FILE_DATA_FORMATS_NOT_EQUAL = 810,
  P_ILLEGAL_MEM_DATA_FORMAT = 820, P_UNKNOWN_FILE_TYPE = 830, P_UNKNOWN_MEM_TYPE = 840, P_INCOMP_FLOAT_CONVERSION = 850,
  P_MALLOC_FAILED = 900
}
enum  pT_freq {
  P_50HZ = 0, P_60HZ, P_REAL_60HZ, P_75HZ,
  P_90HZ, P_REAL_90HZ, P_100HZ, P_120HZ,
  P_REAL_120HZ, P_25HZ, P_24HZ, P_REAL_24HZ,
  P_30HZ, P_REAL_30HZ, P_UNKNOWN_FREQ
}
enum  pT_color {
  P_NO_COLOR = 0, P_COLOR_422, P_COLOR_420, P_COLOR_444_PL,
  P_COLOR_422_PL, P_COLOR_420_PL, P_COLOR_RGB, P_STREAM,
  P_COLOR_XYZ, P_UNKNOWN_COLOR
}
enum  pT_asp_rat { P_4_3 = 0, P_16_9, P_AS_WH, P_UNKNOWN_ASPECT_RATIO }
enum  pT_data_fmt {
  P_8_BIT_FILE = 0, P_10_BIT_FILE, P_12_BIT_FILE, P_14_BIT_FILE,
  P_16_BIT_FILE, P_16_REAL_FILE, P_UNKNOWN_DATA_FORMAT
}
enum  pT_size {
  P_SD = 0, P_CIF, P_QCIF, P_HDp,
  P_HDi, P_UNKNOWN_SIZE
}
enum  pT_buf_type {
  P_FLOAT = 0, P_DOUBLE, P_LONG, P_ULONG,
  P_INT, P_UINT, P_SHORT, P_USHORT,
  P_CHAR, P_UCHAR
}

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)
pT_status p_mod_num_frames (pT_header *header, int num_frames)
pT_status p_mod_color_format (pT_header *header, pT_color color_format)
pT_status p_mod_aspect_ratio (pT_header *header, pT_asp_rat ratio)
pT_status p_mod_to_progressive (pT_header *header)
pT_status p_mod_to_interlaced (pT_header *header)
pT_status p_mod_to_dbl_image_rate (pT_header *header)
pT_status p_mod_to_onehalf_image_rate (pT_header *header)
pT_status p_mod_image_size (pT_header *header, int width, int height)
pT_status p_mod_defined_image_size (pT_header *header, pT_size image_size, int pixels_per_line)
pT_status p_mod_all_freqs (pT_header *header, double image_freq, double line_freq, double pixel_freq)
pT_status p_mod_defined_image_freq (pT_header *header, pT_freq image_freq)
pT_status p_mod_file_data_format (pT_header *header, pT_data_fmt file_data_fmt)
pT_status p_mod_file_description (pT_header *header, char *description)
int p_get_num_frames (const pT_header *header)
int p_is_interlaced (const pT_header *header)
int p_is_progressive (const pT_header *header)
int p_get_frame_width (const pT_header *header)
int p_get_frame_height (const pT_header *header)
void p_get_y_buffer_size (const pT_header *header, int *width, int *height)
void p_get_uv_buffer_size (const pT_header *header, int *width, int *height)
void p_get_rgb_buffer_size (const pT_header *header, int *width, int *height)
void p_get_s_buffer_size (const pT_header *header, int *width, int *height)
pT_color p_get_color_format (const pT_header *header)
void p_get_all_freqs (const pT_header *header, double *image_freq, double *line_freq, double *pixel_freq)
pT_freq p_get_image_freq (const pT_header *header)
pT_size p_get_image_size (const pT_header *header)
pT_asp_rat p_get_aspect_ratio (const pT_header *header)
pT_data_fmt p_get_file_data_format (const pT_header *header)
char * p_get_file_description (const pT_header *header)
pT_status p_read_field (const char *filename, pT_header *header, int frame, int field, unsigned char *y_fld, unsigned char *uv_fld, int read_mode, int width, int fld_height, int stride)
pT_status p_read_frame (const char *filename, pT_header *header, int frame, unsigned char *y_or_s_frm, unsigned char *uv_frm, int read_mode, int width, int frm_height, int stride)
pT_status p_write_field (const char *filename, pT_header *header, int frame, int field, const unsigned char *y_fld, const unsigned char *uv_fld, int width, int fld_height, int stride)
pT_status p_write_frame (const char *filename, pT_header *header, int frame, const unsigned char *y_or_s_frm, const unsigned char *uv_frm, int width, int frm_height, int stride)
pT_status p_read_field_16 (const char *filename, pT_header *header, int frame, int field, unsigned short *y_fld, unsigned short *uv_fld, int read_mode, int width, int fld_height, int stride)
pT_status p_read_frame_16 (const char *filename, pT_header *header, int frame, unsigned short *y_or_s_frm, unsigned short *uv_frm, int read_mode, int width, int frm_height, int stride)
pT_status p_write_field_16 (const char *filename, pT_header *header, int frame, int field, const unsigned short *y_fld, const unsigned short *uv_fld, int write_mode, int width, int fld_height, int stride)
pT_status p_write_frame_16 (const char *filename, pT_header *header, int frame, const unsigned short *y_or_s_frm, const unsigned short *uv_frm, int write_mode, int width, int frm_height, int stride)
pT_status p_read_field_planar (const char *filename, pT_header *header, int frame, int field, unsigned char *y_or_r_fld, unsigned char *u_or_g_fld, unsigned char *v_or_b_fld, int read_mode, int width, int fld_height, int stride, int uv_stride)
pT_status p_read_frame_planar (const char *filename, pT_header *header, int frame, unsigned char *y_or_r_frm, unsigned char *u_or_g_frm, unsigned char *v_or_b_frm, int read_mode, int width, int frm_height, int stride, int uv_stride)
pT_status p_write_field_planar (const char *filename, pT_header *header, int frame, int field, const unsigned char *y_or_r_fld, const unsigned char *u_or_g_fld, const unsigned char *v_or_b_fld, int width, int fld_height, int stride, int uv_stride)
pT_status p_write_frame_planar (const char *filename, pT_header *header, int frame, const unsigned char *y_or_r_frm, const unsigned char *u_or_g_frm, const unsigned char *v_or_b_frm, int width, int frm_height, int stride, int uv_stride)
pT_status p_read_field_planar_16 (const char *filename, pT_header *header, int frame, int field, unsigned short *y_or_r_fld, unsigned short *u_or_g_fld, unsigned short *v_or_b_fld, int read_mode, int width, int fld_height, int stride, int uv_stride)
pT_status p_read_frame_planar_16 (const char *filename, pT_header *header, int frame, unsigned short *y_or_r_frm, unsigned short *u_or_g_frm, unsigned short *v_or_b_frm, int read_mode, int width, int frm_height, int stride, int uv_stride)
pT_status p_write_field_planar_16 (const char *filename, pT_header *header, int frame, int field, const unsigned short *y_or_r_fld, const unsigned short *u_or_g_fld, const unsigned short *v_or_b_fld, int write_mode, int width, int fld_height, int stride, int uv_stride)
pT_status p_write_frame_planar_16 (const char *filename, pT_header *header, int frame, const unsigned short *y_or_r_frm, const unsigned short *u_or_g_frm, const unsigned short *v_or_b_frm, int write_mode, int width, int frm_height, int stride, int uv_stride)
pT_status p_read_field_comp (const char *filename, pT_header *header, int frame, int field, int comp, unsigned char *c_fld, int read_mode, int width, int fld_height, int stride)
pT_status p_read_frame_comp (const char *filename, pT_header *header, int frame, int comp, unsigned char *c_frm, int read_mode, int width, int frm_height, int stride)
pT_status p_write_field_comp (const char *filename, pT_header *header, int frame, int field, int comp, const unsigned char *c_fld, int width, int fld_height, int stride)
pT_status p_write_frame_comp (const char *filename, pT_header *header, int frame, int comp, const unsigned char *c_frm, int width, int frm_height, int stride)
pT_status p_read_field_comp_16 (const char *filename, pT_header *header, int frame, int field, int comp, unsigned short *c_fld, int read_mode, int width, int fld_height, int stride)
pT_status p_read_frame_comp_16 (const char *filename, pT_header *header, int frame, int comp, unsigned short *c_frm, int read_mode, int width, int frm_height, int stride)
pT_status p_write_field_comp_16 (const char *filename, pT_header *header, int frame, int field, int comp, const unsigned short *c_fld, int write_mode, int width, int fld_height, int stride)
pT_status p_write_frame_comp_16 (const char *filename, pT_header *header, int frame, int comp, const unsigned short *c_frm, int write_mode, int width, int frm_height, int stride)
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)
pT_status p_cce_read_comp (const char *filename, pT_header *header, int frame, int field, int comp, void *abuf, pT_buf_type atype, int offset, int gain, int width, int height, int stride)
pT_status p_cce_write_comp (const char *filename, pT_header *header, int frame, int field, int comp, const void *abuf, pT_buf_type atype, int offset, int gain, int width, int height, int stride)
pT_status p_cce_read_float_xyz (const char *filename, pT_header *header, int frame, int field, float *r_or_x_frm, float *g_or_y_frm, float *b_or_z_frm, int width, int height, int stride)
pT_status p_cce_write_float_xyz (const char *filename, pT_header *header, int frame, int field, float *r_or_x_frm, float *g_or_y_frm, float *b_or_z_frm, int width, int height, int stride)
int p_mod_add_aux (pT_header *header, int max_size, const char *name, int descr_len, const char *description)
int p_get_num_aux (const pT_header *header)
int p_get_aux_by_name (const pT_header *header, const char *name)
pT_status p_mod_rm_aux (pT_header *header, int aux_id)
pT_status p_get_aux (const pT_header *header, int aux_id, int *max_size, char *name, int *descr_len, char *description)
pT_status p_read_aux (const char *filename, pT_header *header, int frame, int field, int aux_id, int *size, unsigned char *buf)
pT_status p_write_aux (const char *filename, pT_header *header, int frame, int field, int aux_id, int size, unsigned char *buf)
pT_status p_open_file (const char *filename, int write)
pT_status p_close_file (const char *filename)
pT_status p_set_file_buf_size (const int size_kb)
int p_get_file_buf_size (void)
void p_fatal_error (pT_status status, FILE *stream)
void p_fatal_error_fileio (pT_status status, const char *filename, FILE *stream)
char * p_get_error_string (pT_status status)
char * p_get_version (void)
char * p_get_magic (void)

Variables

char * p_revision_str


Enumeration Type Documentation

enum pT_freq
 

Image frequency types

Enumeration values:
P_50HZ 
P_60HZ 
P_REAL_60HZ 
P_75HZ 
P_90HZ 
P_REAL_90HZ 
P_100HZ 
P_120HZ 
P_REAL_120HZ 
P_25HZ 
P_24HZ 
P_REAL_24HZ 
P_30HZ 
P_REAL_30HZ 
P_UNKNOWN_FREQ 

enum pT_color
 

Color types (or component format types)

Enumeration values:
P_NO_COLOR 
P_COLOR_422 
P_COLOR_420 
P_COLOR_444_PL 
P_COLOR_422_PL 
P_COLOR_420_PL 
P_COLOR_RGB 
P_STREAM 
P_COLOR_XYZ 
P_UNKNOWN_COLOR 

enum pT_asp_rat
 

Aspect ratio types

Enumeration values:
P_4_3 
P_16_9 
P_AS_WH 
P_UNKNOWN_ASPECT_RATIO 

enum pT_data_fmt
 

Data format types of pfspd file

Enumeration values:
P_8_BIT_FILE 
P_10_BIT_FILE 
P_12_BIT_FILE 
P_14_BIT_FILE 
P_16_BIT_FILE 
P_16_REAL_FILE 
P_UNKNOWN_DATA_FORMAT 

enum pT_size
 

Image size types

Enumeration values:
P_SD 
P_CIF 
P_QCIF 
P_HDp 
P_HDi 
P_UNKNOWN_SIZE 

enum pT_buf_type
 

Application buffer types for convenience routines

Enumeration values:
P_FLOAT 
P_DOUBLE 
P_LONG 
P_ULONG 
P_INT 
P_UINT 
P_SHORT 
P_USHORT 
P_CHAR 
P_UCHAR 


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