VLC
3.0.15
|
Macros | |
#define | PICTURE_SW_SIZE_MAX (1<<28) /* 256MB: 8K * 8K * 4*/ |
Functions | |
static int | AllocatePicture (picture_t *p_pic) |
Allocate a new picture in the heap. More... | |
static void | PictureDestroyContext (picture_t *p_picture) |
static void | picture_DestroyFromResource (picture_t *p_picture) |
Destroys a picture allocated by picture_NewFromResource() but without a custom destruction callback. More... | |
static void | picture_Destroy (picture_t *p_picture) |
Destroys a picture allocated with picture_NewFromFormat() (and thus AllocatePicture()). More... | |
void | picture_Reset (picture_t *p_picture) |
This function will reset a picture information (properties and quantizers). More... | |
static int | LCM (int a, int b) |
int | picture_Setup (picture_t *p_picture, const video_format_t *restrict fmt) |
picture_t * | picture_NewFromResource (const video_format_t *p_fmt, const picture_resource_t *p_resource) |
This function will create a new picture using the provided resource. More... | |
picture_t * | picture_NewFromFormat (const video_format_t *p_fmt) |
This function will create a new picture using the given format. More... | |
picture_t * | picture_New (vlc_fourcc_t i_chroma, int i_width, int i_height, int i_sar_num, int i_sar_den) |
This function will create a new picture. More... | |
picture_t * | picture_Hold (picture_t *p_picture) |
This function will increase the picture reference count. More... | |
void | picture_Release (picture_t *p_picture) |
This function will release a picture. More... | |
void | plane_CopyPixels (plane_t *p_dst, const plane_t *p_src) |
void | picture_CopyProperties (picture_t *p_dst, const picture_t *p_src) |
This function will copy all picture dynamic properties. More... | |
void | picture_CopyPixels (picture_t *p_dst, const picture_t *p_src) |
This function will copy the picture pixels. More... | |
void | picture_Copy (picture_t *p_dst, const picture_t *p_src) |
This function will copy both picture dynamic properties and pixels. More... | |
static void | picture_DestroyClone (picture_t *clone) |
picture_t * | picture_Clone (picture_t *picture) |
Perform a shallow picture copy. More... | |
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. More... | |
#define PICTURE_SW_SIZE_MAX (1<<28) /* 256MB: 8K * 8K * 4*/ |
|
static |
Allocate a new picture in the heap.
This function allocates a fake direct buffer in memory, which can be used exactly like a video buffer. The video output thread then manages how it gets displayed.
< Not enough memory
< Not enough memory
< Unspecified error
< No error
References aligned_alloc(), plane_t::i_lines, plane_t::i_pitch, picture_t::i_planes, picture_t::p, p, plane_t::p_pixels, PICTURE_SW_SIZE_MAX, VLC_EGENERIC, VLC_ENOMEM, and VLC_SUCCESS.
Referenced by picture_NewFromResource().
|
static |
Perform a shallow picture copy.
This function makes a shallow copy of an existing picture. The same planes and resources will be used, and the cloned picture reference count will be incremented.
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. |
Referenced by ImageConvert().
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.
Referenced by picture_DestroyClone().
This function will copy all picture dynamic properties.
Referenced by picture_DestroyClone().
|
static |
Destroys a picture allocated with picture_NewFromFormat() (and thus AllocatePicture()).
References aligned_free, picture_t::p, and plane_t::p_pixels.
Referenced by picture_NewFromResource().
|
static |
References picture_CopyPixels(), and picture_CopyProperties().
|
static |
Destroys a picture allocated by picture_NewFromResource() but without a custom destruction callback.
References picture_t::p_sys.
Referenced by picture_NewFromResource().
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:
< Not enough memory
< Unspecified error
< No error
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.
Referenced by ImageConvert(), ImageWrite(), picture_pool_ClonePicture(), SpuRenderRegion(), and ThreadDisplayPreparePicture().
picture_t* picture_New | ( | vlc_fourcc_t | i_chroma, |
int | i_width, | ||
int | i_height, | ||
int | i_sar_num, | ||
int | i_sar_den | ||
) |
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, gc.p_sys fields if non NULL.
References picture_NewFromResource().
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 preferred to use this function over picture_New as more information about the format is kept.
Referenced by filter_chain_VideoBufferNew(), filter_new_picture(), picture_pool_NewFromFormat(), subpicture_region_New(), and video_new_buffer().
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 AllocatePicture(), picture_priv_t::destroy, picture_t::format, picture_priv_t::gc, video_format_t::i_chroma, video_format_t::i_height, plane_t::i_lines, picture_resource_t::i_lines, plane_t::i_pitch, picture_resource_t::i_pitch, picture_t::i_planes, video_format_t::i_sar_den, video_format_t::i_sar_num, video_format_t::i_visible_height, video_format_t::i_visible_width, video_format_t::i_width, video_format_t::i_x_offset, video_format_t::i_y_offset, picture_priv_t::opaque, picture_t::p, picture_resource_t::p, plane_t::p_pixels, picture_resource_t::p_pixels, picture_t::p_sys, picture_resource_t::p_sys, picture_resource_t::pf_destroy, picture_priv_t::picture, picture_Destroy(), picture_DestroyFromResource(), picture_Setup(), picture_priv_t::refs, unlikely, video_format_CopyCrop(), and video_format_Setup().
Referenced by picture_New(), and picture_pool_ClonePicture().
void picture_Release | ( | picture_t * | p_picture | ) |
This function will release a picture.
It will not have any effect on picture obtained from vout
Referenced by FilterDeletePictures(), ImageConvert(), ImageRead(), ImageWrite(), picture_pool_NewFromFormat(), picture_pool_Release(), picture_pool_ReleasePicture(), picture_pool_Reserve(), spuregion_CreateFromPicture(), SpuRenderRegion(), subpicture_NewFromPicture(), subpicture_region_Delete(), subpicture_region_private_Delete(), ThreadDisplayPreparePicture(), and vout_PutPicture().
void picture_Reset | ( | picture_t * | ) |
This function will reset a picture information (properties and quantizers).
It is sometimes useful 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, PictureDestroyContext(), and VLC_TS_INVALID.
Referenced by vout_GetPicture().
int picture_Setup | ( | picture_t * | p_picture, |
const video_format_t *restrict | fmt | ||
) |
|
static |
References picture_t::context, and picture_context_t::destroy.
Referenced by picture_Reset().