
Go to the source code of this file.
Data Structures | |
| struct | plane_t |
| Description of a planar graphic field. More... | |
| struct | picture_t |
| Video picture. More... | |
| struct | picture_resource_t |
| Resource for a picture. More... | |
Defines | |
| #define | VLC_PICTURE_H 1 |
| #define | PICTURE_PLANE_MAX (VOUT_MAX_PLANES) |
| Maximum number of plane for a picture. | |
| #define | Y_PIXELS p[Y_PLANE].p_pixels |
| #define | Y_PITCH p[Y_PLANE].i_pitch |
| #define | U_PIXELS p[U_PLANE].p_pixels |
| #define | U_PITCH p[U_PLANE].i_pitch |
| #define | V_PIXELS p[V_PLANE].p_pixels |
| #define | V_PITCH p[V_PLANE].i_pitch |
| #define | A_PIXELS p[A_PLANE].p_pixels |
| #define | A_PITCH p[A_PLANE].i_pitch |
Typedefs | |
| typedef struct picture_release_sys_t | picture_release_sys_t |
| A private definition to help overloading picture release. | |
Enumerations | |
| enum | { EMPTY_PICTURE = 0, MEMORY_PICTURE = 100, DIRECT_PICTURE = 200 } |
| enum | { FREE_PICTURE, RESERVED_PICTURE, READY_PICTURE, DISPLAYED_PICTURE, DESTROYED_PICTURE } |
| enum | { QTYPE_NONE, QTYPE_MPEG1, QTYPE_MPEG2, QTYPE_H264 } |
| enum | { Y_PLANE = 0, U_PLANE = 1, V_PLANE = 2, A_PLANE = 3 } |
Functions | |
| picture_t * | picture_New (vlc_fourcc_t i_chroma, int i_width, int i_height, int i_aspect) |
| This function will create a new picture. | |
| picture_t * | picture_NewFromFormat (const video_format_t *p_fmt) |
| This function will create a new picture using the given format. | |
| picture_t * | picture_NewFromResource (const video_format_t *, const picture_resource_t *) |
| This function will create a new picture using the provided resource. | |
| void | picture_Delete (picture_t *) |
| This function will force the destruction a picture. | |
| static picture_t * | picture_Hold (picture_t *p_picture) |
| This function will increase the picture reference count. | |
| static void | picture_Release (picture_t *p_picture) |
| This function will release a picture. | |
| static bool | picture_IsReferenced (picture_t *p_picture) |
| This function will return true if you are not the only owner of the picture. | |
| static void | picture_CleanupQuant (picture_t *p_pic) |
| Cleanup quantization matrix data and set to 0. | |
| static void | picture_CopyProperties (picture_t *p_dst, const picture_t *p_src) |
| This function will copy all picture dynamic properties. | |
| void | picture_Reset (picture_t *) |
| This function will reset a picture informations (properties and quantizers). | |
| void | picture_CopyPixels (picture_t *p_dst, const picture_t *p_src) |
| This function will copy the picture pixels. | |
| void | plane_CopyPixels (plane_t *p_dst, const plane_t *p_src) |
| static void | picture_Copy (picture_t *p_dst, const picture_t *p_src) |
| This function will copy both picture dynamic properties and pixels. | |
| int | picture_Export (vlc_object_t *p_obj, block_t **pp_image, video_format_t *p_fmt, picture_t *p_picture, vlc_fourcc_t i_format, int i_override_width, int i_override_height) |
| This function will export a picture to an encoded bitstream. | |
| int | picture_Setup (picture_t *, vlc_fourcc_t i_chroma, int i_width, int i_height, int i_aspect) |
| This function will setup all fields of a picture_t without allocating any memory. | |
| #define A_PITCH p[A_PLANE].i_pitch |
| #define A_PIXELS p[A_PLANE].p_pixels |
| #define PICTURE_PLANE_MAX (VOUT_MAX_PLANES) |
| #define U_PITCH p[U_PLANE].i_pitch |
| #define U_PIXELS p[U_PLANE].p_pixels |
| #define V_PITCH p[V_PLANE].i_pitch |
| #define V_PIXELS p[V_PLANE].p_pixels |
| #define VLC_PICTURE_H 1 |
| #define Y_PITCH p[Y_PLANE].i_pitch |
| #define Y_PIXELS p[Y_PLANE].p_pixels |
| typedef struct picture_release_sys_t picture_release_sys_t |
A private definition to help overloading picture release.
| anonymous enum |
| static void picture_CleanupQuant | ( | picture_t * | p_pic | ) | [inline, static] |
Cleanup quantization matrix data and set to 0.
References picture_t::i_qstride, picture_t::i_qtype, and picture_t::p_q.
Referenced by DestroyPicture(), and picture_Reset().
This function will copy both picture dynamic properties and pixels.
You have to notice that sometime a simple picture_Hold may do what you want without the copy overhead. Provided for convenience.
| p_dst | pointer to the destination picture. | |
| p_src | pointer to the source picture. |
References picture_CopyPixels(), and picture_CopyProperties().
Referenced by create_picture_region(), DecodeBlock(), Display(), Filter(), FilterPacked(), FilterSub(), FilterVideo(), ImageConvert(), Render(), RenderText(), RenderYadif(), Send(), SnapshotRatio(), transcode_video_process(), vout_RenderPicture(), and vout_snapshot_Set().
This function will copy the picture pixels.
You can safely copy between pictures that do not have the same size, only the compatible(smaller) part will be copied.
References i, picture_t::i_planes, picture_t::p, and plane_CopyPixels().
Referenced by Filter(), LoadEmbeddedImage(), picture_Copy(), and PostprocPict().
This function will copy all picture dynamic properties.
References picture_t::b_force, picture_t::b_progressive, picture_t::b_top_field_first, picture_t::date, and picture_t::i_nb_fields.
Referenced by CopyInfoAndRelease(), Deinterlace(), Filter(), and picture_Copy().
| void picture_Delete | ( | picture_t * | ) |
This function will force the destruction a picture.
The value of the picture reference count should be 0 before entering this function. Unless used for reimplementing pf_release, you should not use this function but picture_Release.
References picture_t::i_refcount, picture_t::p_data_orig, picture_t::p_q, picture_t::p_release_sys, and picture_t::p_sys.
Referenced by PictureReleaseCallback(), and video_del_buffer().
| int picture_Export | ( | vlc_object_t * | p_obj, | |
| block_t ** | pp_image, | |||
| video_format_t * | p_fmt, | |||
| picture_t * | p_picture, | |||
| vlc_fourcc_t | i_format, | |||
| int | i_override_width, | |||
| int | i_override_height | |||
| ) |
This function will export a picture to an encoded bitstream.
pp_image will contain the encoded bitstream in psz_format format.
p_fmt can be NULL otherwise it will be set with the format used for the picture before encoding.
i_override_width/height allow to override the width and/or the height of the picture to be encoded:
References picture_t::date, picture_t::format, video_format_t::i_chroma, block_t::i_dts, video_format_t::i_height, block_t::i_pts, video_format_t::i_sar_den, video_format_t::i_sar_num, video_format_t::i_width, image_HandlerCreate, image_HandlerDelete(), image_Write, VLC_EGENERIC, and VLC_SUCCESS.
Referenced by vout_GetSnapshot().
This function will increase the picture reference count.
It will not have any effect on picture obtained from vout
It returns the given picture for convenience.
References picture_t::i_refcount, and picture_t::pf_release.
Referenced by Display(), ImageConvert(), ImageFilter(), ImageWrite(), picture_fifo_Peek(), picture_pool_Get(), SpuRenderRegion(), video_link_picture(), and video_link_picture_decoder().
| static bool picture_IsReferenced | ( | picture_t * | p_picture | ) | [inline, static] |
This function will return true if you are not the only owner of the picture.
It is only valid if it is created using picture_New.
References picture_t::i_refcount.
Referenced by Display(), and transcode_video_process().
| picture_t* picture_New | ( | vlc_fourcc_t | i_chroma, | |
| int | i_width, | |||
| int | i_height, | |||
| int | i_aspect | |||
| ) |
This function will create a new picture.
The picture created will implement a default release management compatible with picture_Hold and picture_Release. This default management will release p_sys, p_q, p_data_orig fields if non NULL.
References picture_NewFromFormat(), and video_format_Setup().
Referenced by AllocatePicture(), Create(), Get(), Render(), RenderYUVA(), Send(), SnapshotRatio(), spu_new_video_buffer(), subpicture_region_New(), video_new_buffer(), VideoBufferNew(), and vnc_worker_thread().
| picture_t* picture_NewFromFormat | ( | const video_format_t * | p_fmt | ) |
This function will create a new picture using the given format.
When possible, it is prefered to use this function over picture_New as more information about the format is kept.
References picture_NewFromResource().
Referenced by Get(), picture_New(), picture_pool_NewFromFormat(), RenderYadif(), and vout_snapshot_Set().
| picture_t* picture_NewFromResource | ( | const video_format_t * | , | |
| const picture_resource_t * | ||||
| ) |
This function will create a new picture using the provided resource.
If the resource is NULL then a plain picture_NewFromFormat is returned.
References __vout_AllocatePicture(), picture_t::format, i, video_format_t::i_aspect, video_format_t::i_chroma, video_format_t::i_height, picture_resource_t::i_lines, plane_t::i_lines, picture_resource_t::i_pitch, plane_t::i_pitch, picture_t::i_planes, picture_t::i_refcount, picture_t::i_status, video_format_t::i_width, picture_resource_t::p, picture_t::p, picture_resource_t::p_pixels, plane_t::p_pixels, picture_resource_t::p_sys, picture_t::p_sys, picture_t::pf_release, picture_Setup(), PictureReleaseCallback(), RESERVED_PICTURE, and video_format_Setup().
Referenced by Direct3DCreatePool(), Display(), Get(), and picture_NewFromFormat().
| static void picture_Release | ( | picture_t * | p_picture | ) | [inline, static] |
This function will release a picture.
It will not have any effect on picture obtained from vout
References picture_t::pf_release.
Referenced by AllocatePicture(), Close(), CloseDecoder(), CopyInfoAndRelease(), Create(), DeAllocatePicture(), Deinterlace(), Del(), Destroy(), Direct3DCreatePool(), Display(), DisplayStat(), End(), exec_DataSharedMem(), FakeCallback(), FileBitmap::FileBitmap(), Filter(), FilterPacked(), FilterPlanar(), FilterVideo(), FreeRSS(), Get(), ImageConvert(), ImageRead(), LoadImage(), LoadMask(), LogoListUnload(), MaskCallback(), OpenDecoder(), picture_fifo_Flush(), picture_pool_Delete(), picture_pool_NewFromFormat(), PostprocPict(), Prepare(), ReleaseImages(), Render(), RenderCursor(), RenderYadif(), Send(), SnapshotRatio(), spu_del_video_buffer(), SpuRegionPrivateDelete(), SpuRenderRegion(), subpicture_NewFromPicture(), subpicture_region_Delete(), transcode_video_process(), video_del_buffer_decoder(), video_del_buffer_filter(), video_unlink_picture(), video_unlink_picture_decoder(), VideoBufferDelete(), vnc_worker_thread(), vout_GetSnapshot(), vout_snapshot_Clean(), and VoutSaveSnapshot().
| void picture_Reset | ( | picture_t * | ) |
This function will reset a picture informations (properties and quantizers).
It is sometimes usefull for reusing pictures (like from a pool).
References picture_t::b_force, picture_t::b_progressive, picture_t::b_top_field_first, picture_t::date, picture_t::i_nb_fields, picture_CleanupQuant(), and VLC_TS_INVALID.
| int picture_Setup | ( | picture_t * | , | |
| vlc_fourcc_t | i_chroma, | |||
| int | i_width, | |||
| int | i_height, | |||
| int | i_aspect | |||
| ) |
This function will setup all fields of a picture_t without allocating any memory.
XXX The memory must already be initialized. It does not need to be released.
It will return VLC_EGENERIC if the core does not understand the requested format.
It can be usefull to get the properties of planes.
References A_PLANE, picture_t::format, plane_t::i_lines, plane_t::i_pitch, plane_t::i_pixel_pitch, picture_t::i_planes, picture_t::i_qstride, picture_t::i_qtype, picture_t::i_refcount, plane_t::i_visible_lines, plane_t::i_visible_pitch, picture_t::p, plane_t::p_pixels, picture_t::p_q, picture_t::p_release_sys, picture_t::pf_lock, picture_t::pf_release, picture_t::pf_unlock, QTYPE_NONE, U_PLANE, V_PLANE, VIDEO_ES, video_format_Setup(), VLC_CODEC_GREY, VLC_CODEC_I410, VLC_CODEC_I411, VLC_CODEC_I420, VLC_CODEC_I422, VLC_CODEC_I440, VLC_CODEC_I444, VLC_CODEC_J420, VLC_CODEC_J422, VLC_CODEC_J440, VLC_CODEC_J444, VLC_CODEC_RGB15, VLC_CODEC_RGB16, VLC_CODEC_RGB24, VLC_CODEC_RGB32, VLC_CODEC_RGB8, VLC_CODEC_RGBA, VLC_CODEC_RGBP, VLC_CODEC_UYVY, VLC_CODEC_VYUY, VLC_CODEC_Y211, VLC_CODEC_YUVA, VLC_CODEC_YUVP, VLC_CODEC_YUYV, VLC_CODEC_YV12, VLC_CODEC_YVYU, VLC_EGENERIC, vlc_fourcc_GetCodec(), VLC_SUCCESS, VOUT_MAX_PLANES, and Y_PLANE.
Referenced by __vout_AllocatePicture(), NewPicture(), Open(), OpenVideoDev(), picture_NewFromResource(), RenderCursor(), SendFrame(), and UnpackFromFile().
References __MIN, i_height, plane_t::i_pitch, plane_t::i_visible_lines, plane_t::i_visible_pitch, plane_t::p_pixels, and vlc_memcpy().
Referenced by Filter(), and picture_CopyPixels().
1.5.6