63#define PARAM_WIDTH (1<<0u)
64#define PARAM_HEIGHT (1<<2u)
65#define PARAM_CODEC (1<<3u)
66#define PARAM_INTERLACING (1<<4u)
67#define PARAM_FPS (1<<5u)
68#define PARAM_TILE_COUNT (1<<6u)
76#define VIDEO_FRAME_DISPOSE(frame) if ((frame) && (frame)->callbacks.dispose) \
77 (frame)->callbacks.dispose(frame)
220#define AUX_INTERLACED (1<<0)
221#define AUX_PROGRESSIVE (1<<1)
223#define AUX_RGB (1<<3)
224#define AUX_YUV (1<<4)
225#define AUX_10Bit (1<<5)
struct video_frame * frame
Struct tile is an area of video_frame.
enum interlacing_t interlacing
unsigned int height
height of every tile (!)
Struct video_frame represents a video frame and contains video description.
This file contains some common data types.
struct video_frame * vf_alloc(int count)
Allocates blank video frame.
void vf_free(struct video_frame *buf)
Frees video_frame structure.
struct video_desc video_desc_from_frame(const struct video_frame *frame)
Returns struct video_desc from video frame.
enum interlacing_t get_interlacing_from_suffix(const char *suffix)
void vf_clear(struct video_frame *f)
void buf_get_linesizes(int width, codec_t color_spec, int *linesize)
void vf_data_deleter(struct video_frame *buf)
const char * save_video_frame(struct video_frame *frame, const char *name, bool raw)
bool video_desc_eq_excl_param(struct video_desc a, struct video_desc b, unsigned int excluded_params)
Compares two video descriptions.
const char * get_interlacing_suffix(enum interlacing_t interlacing)
Returns suffix describing interlacing Eg. p, i or psf.
double compute_fps(int fps, int fpsd, int fd, int fi)
Computes FPS as a double from packet fields.
void il_upper_to_merged(char *dst, char *src, int linesize, int height, void **stored_state)
Converts upper-field-first to interlaced merged.
struct video_frame * vf_alloc_desc(struct video_desc desc)
Allocates video frame accordig given desc.
void il_merged_to_upper(char *dst, char *src, int linesize, int height, void **stored_state)
Converts interlaced merged to upper-field-first.
bool parse_fps(const char *fps, struct video_desc *desc)
void vf_restore_metadata(struct video_frame *f, void *)
unsigned int vf_get_data_len(struct video_frame *f)
void il_lower_to_merged(char *dst, char *src, int linesize, int height, void **stored_state)
bool video_desc_eq(struct video_desc, struct video_desc)
Compares two video descriptions.
void vf_recycle(struct video_frame *buf)
This function should be called before returning a frame back to a frame pool. Currently this is used ...
bool save_video_frame_as_pnm(struct video_frame *frame, const char *name)
struct video_frame * vf_get_copy(struct video_frame *original_frame)
Makes deep copy of the video frame.
struct tile * vf_get_tile(struct video_frame *buf, int pos)
Returns pointer to n-th tile from video frame Equivalent to &video_frame::tiles[pos].
struct video_frame * vf_alloc_desc_data(struct video_desc desc)
allocates struct video_frame including data pointers in RAM
void vf_store_metadata(const struct video_frame *f, void *)
const char * get_interlacing_description(enum interlacing_t interlacing)
Returns description of interlacing Eg. "progressive".
void buf_get_planes(int width, int height, codec_t color_spec, char *data, char **planes)
void vf_copy_metadata(struct video_frame *dest, const struct video_frame *src)
struct video_frame * load_video_frame(const char *name, codec_t codec, int width, int height)