videoframe_c.h File Reference

C interface for accessing the data of frames. More...


Typedefs

typedef AVS_VideoFrame_ AVS_VideoFrame
 opaque declaration of a videoinfo

Functions

AVS_C_API void avs_videoframe_delete (AVS_VideoFrame *p_vf)
 Delete an AVS_VideoFrame.
AVS_C_API int avs_videoframe_width_get (const AVS_VideoFrame *p_vf)
 Retrieve the width of a frame.
AVS_C_API int avs_videoframe_height_get (const AVS_VideoFrame *p_vf)
 Retrieve the height of a frame.
AVS_C_API const unsigned char * avs_videoframe_plane_get (const AVS_VideoFrame *p_vf, char plane)
 Retrieve the plane of a frame.
AVS_C_API void avs_videoframe_plane_blit (const AVS_VideoFrame *p_vf, char plane, unsigned char *ptr, int pitch)
 Blit the plane of a frame on some data.


Detailed Description

C interface for accessing the data of frames. A videoframe is created with the function avs_clip_videoframe_get().

You can get the size of the frame with the functions avs_videoframe_width_get() and avs_videoframe_height_get().

You can retrieve the data of a frame with the function avs_videoframe_plane_get(). This function takes a char as parameter, which corresponds to the plane that you want to get. If the colorspace is interleaved (RGB24, RGB32 or YUY2), then use the character '~'. If the colorspace is planar (YV12 or YV24), use 'Y', 'U' or 'V' to access respectively to the Y, U and V planes.

If you want to blit the frame on your own data, use avs_videoframe_plane_blit().

Once you have finished with an AVS_VideoFrame, you delete it with avs_videoframe_delete().


Function Documentation

AVS_C_API void avs_videoframe_delete ( AVS_VideoFrame p_vf  ) 

Parameters:
p_vf The frame to delete.
Delete the frame p_vf.

AVS_C_API int avs_videoframe_height_get ( const AVS_VideoFrame p_vf  ) 

Parameters:
p_vf The videoframe.
Returns:
The height of the frame.
Retrieve the height of the frame p_vf. If p_vf is NULL, this function returns 0.

AVS_C_API void avs_videoframe_plane_blit ( const AVS_VideoFrame p_vf,
char  plane,
unsigned char *  ptr,
int  pitch 
)

Parameters:
p_vf The videoframe.
plane The plane to blit.
ptr the pointer on which we want to blit.
pitch The pitch to use.
Blit the plane plane of the frame p_vf on the data specified by ptr. The pitch is set by pitch. If p_vf is NULL, this function does nothing.

AVS_C_API const unsigned char* avs_videoframe_plane_get ( const AVS_VideoFrame p_vf,
char  plane 
)

Parameters:
p_vf The videoframe.
plane The plane.
Returns:
The pointer on the data of the plane.
Retrieve the plane of the frame p_vf given by plane. For an interleaved colorspace, use '~'. For a planar colorspace, use 'Y', 'U' or 'V' for respctively the planes Y, U and V. If p_vf is NULL, this function returns NULL, otherwise, it returns a pointer on the data of the plane.

AVS_C_API int avs_videoframe_width_get ( const AVS_VideoFrame p_vf  ) 

Parameters:
p_vf The videoframe.
Returns:
The width of the frame.
Retrieve the width of the frame p_vf. If p_vf is NULL, this function returns 0.


Generated on Sun Jul 30 18:46:52 2006 for Avisynth by  doxygen 1.4.7