26#define VLC_PICTURE_H 1
68#define PICTURE_PLANE_MAX (VOUT_MAX_PLANES)
178 return pic->
p_next != NULL;
208 return chain->
front == NULL;
259 if (chain->
front == NULL)
479 int i_override_height,
bool b_crop );
509#define Y_PIXELS p[Y_PLANE].p_pixels
510#define Y_PITCH p[Y_PLANE].i_pitch
511#define U_PIXELS p[U_PLANE].p_pixels
512#define U_PITCH p[U_PLANE].i_pitch
513#define V_PIXELS p[V_PLANE].p_pixels
514#define V_PITCH p[V_PLANE].i_pitch
515#define A_PIXELS p[A_PLANE].p_pixels
516#define A_PITCH p[A_PLANE].i_pitch
#define VLC_USED
Definition: fourcc_gen.c:32
#define VLC_API
Definition: fourcc_gen.c:31
uint32_t vlc_fourcc_t
Definition: fourcc_gen.c:33
uint32_t vlc_ancillary_id
ID of an ancillary.
Definition: vlc_ancillary.h:68
#define vlc_assert(pred)
Run-time assertion.
Definition: vlc_common.h:301
static picture_t * picture_Hold(picture_t *picture)
Increments the picture reference count.
Definition: vlc_picture.h:361
void * picture_AttachNewAncillary(picture_t *pic, vlc_ancillary_id id, size_t size)
Allocate a new ancillary and attach it to a picture.
Definition: picture.c:485
vlc_video_context_type
Decoder device type.
Definition: vlc_picture.h:96
picture_t * picture_NewFromFormat(const video_format_t *p_fmt)
This function will create a new picture using the given format.
picture_t * picture_Clone(picture_t *pic)
Perform a shallow picture copy.
Definition: picture.c:465
void vlc_video_context_Release(vlc_video_context *)
Definition: decoder_device.c:143
static void vlc_picture_chain_AppendChain(picture_t *chain, picture_t *tail)
Append a picture chain to a picture chain.
Definition: vlc_picture.h:273
void picture_CopyProperties(picture_t *p_dst, const picture_t *p_src)
This function will copy all picture dynamic properties.
Definition: picture.c:397
static void picture_Release(picture_t *picture)
Decrements the picture reference count.
Definition: vlc_picture.h:374
struct vlc_ancillary * picture_GetAncillary(const picture_t *pic, vlc_ancillary_id id)
Return the ancillary identified by an ID.
Definition: picture.c:508
static void picture_SwapUV(picture_t *picture)
Swap UV planes of a Tri Planars picture.
Definition: vlc_picture.h:524
void picture_Reset(picture_t *)
This function will reset a picture information (properties and quantizers).
Definition: picture.c:93
void plane_CopyPixels(plane_t *p_dst, const plane_t *p_src)
Definition: picture.c:361
void picture_CopyPixels(picture_t *p_dst, const picture_t *p_src)
This function will copy the picture pixels.
Definition: picture.c:412
struct picture_buffer_t picture_buffer_t
static vlc_picture_chain_t picture_GetAndResetChain(picture_t *pic)
Reset a picture chain.
Definition: vlc_picture.h:297
void * vlc_video_context_GetPrivate(vlc_video_context *, enum vlc_video_context_type)
Definition: decoder_device.c:125
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.
Definition: picture.c:330
int picture_AttachAncillary(picture_t *pic, struct vlc_ancillary *ancillary)
Attach an ancillary to the picture.
Definition: picture.c:478
void picture_Destroy(picture_t *picture)
Destroys a picture without references.
Definition: picture.c:345
static void vlc_picture_chain_Append(vlc_picture_chain_t *chain, picture_t *pic)
Append a picture to a picture chain.
Definition: vlc_picture.h:257
#define PICTURE_PLANE_MAX
Maximum number of plane for a picture.
Definition: vlc_picture.h:69
picture_t * picture_NewFromResource(const video_format_t *, const picture_resource_t *)
This function will create a new picture using the provided resource.
Definition: picture.c:233
vlc_video_context * vlc_video_context_Hold(vlc_video_context *)
Definition: decoder_device.c:137
void picture_Copy(picture_t *p_dst, const picture_t *p_src)
This function will copy both picture dynamic properties and pixels.
Definition: picture.c:423
static void vlc_picture_chain_GetAndClear(vlc_picture_chain_t *in, vlc_picture_chain_t *out)
Copy the picture chain in another picture chain and clear the original picture chain.
Definition: vlc_picture.h:285
vlc_decoder_device * vlc_video_context_HoldDevice(vlc_video_context *)
Get the decoder device used by the device context.
Definition: decoder_device.c:155
enum vlc_video_context_type vlc_video_context_GetType(const vlc_video_context *)
Definition: decoder_device.c:132
struct vlc_pic_chain vlc_picture_chain_t
picture chaining helpers
static vlc_video_context * picture_GetVideoContext(picture_t *pic)
Definition: vlc_picture.h:169
static bool vlc_picture_chain_HasNext(const vlc_picture_chain_t *chain)
Check whether a picture chain has more than one picture.
Definition: vlc_picture.h:215
vlc_video_context * vlc_video_context_Create(vlc_decoder_device *, enum vlc_video_context_type private_type, size_t private_size, const struct vlc_video_context_operations *)
Definition: decoder_device.c:106
struct picture_context_t picture_context_t
static bool picture_HasChainedPics(const picture_t *pic)
Check whether a picture has other pictures linked.
Definition: vlc_picture.h:177
static picture_t * vlc_picture_chain_PeekFront(vlc_picture_chain_t *chain)
Peek the front of a picture chain.
Definition: vlc_picture.h:246
int picture_Setup(picture_t *, const video_format_t *)
This function will setup all fields of a picture_t without allocating any memory.
static void vlc_picture_chain_Init(vlc_picture_chain_t *chain)
Initializes or reset a picture chain.
Definition: vlc_picture.h:196
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, bool b_crop)
This function will export a picture to an encoded bitstream.
Definition: picture.c:517
static bool vlc_picture_chain_IsEmpty(const vlc_picture_chain_t *chain)
Check whether a picture chain holds pictures or not.
Definition: vlc_picture.h:207
static picture_t * vlc_picture_chain_PopFront(vlc_picture_chain_t *chain)
Pop the front of a picture chain.
Definition: vlc_picture.h:227
struct plane_t plane_t
Description of a planar graphic field.
@ VLC_VIDEO_CONTEXT_VDPAU
private: chroma type (YUV) or empty (RGB)
Definition: vlc_picture.h:98
@ VLC_VIDEO_CONTEXT_VAAPI
private: vaapi_vctx* or empty
Definition: vlc_picture.h:97
@ VLC_VIDEO_CONTEXT_GSTDECODE
empty
Definition: vlc_picture.h:105
@ VLC_VIDEO_CONTEXT_D3D11VA
private: d3d11_video_context_t*
Definition: vlc_picture.h:100
@ VLC_VIDEO_CONTEXT_MMAL
empty
Definition: vlc_picture.h:104
@ VLC_VIDEO_CONTEXT_CVPX
private: cvpx_video_context*
Definition: vlc_picture.h:103
@ VLC_VIDEO_CONTEXT_NVDEC
empty
Definition: vlc_picture.h:102
@ VLC_VIDEO_CONTEXT_DXVA2
private: d3d9_video_context_t*
Definition: vlc_picture.h:99
@ VLC_VIDEO_CONTEXT_AWINDOW
private: android_video_context_t*
Definition: vlc_picture.h:101
@ Y_PLANE
Definition: vlc_picture.h:503
@ A_PLANE
Definition: vlc_picture.h:506
@ V_PLANE
Definition: vlc_picture.h:505
@ U_PLANE
Definition: vlc_picture.h:504
Definition: vlc_picture.h:79
off_t offset
Definition: vlc_picture.h:83
void * base
Definition: vlc_picture.h:81
size_t size
Definition: vlc_picture.h:82
int fd
Definition: vlc_picture.h:80
Definition: vlc_picture.h:72
void(* destroy)(struct picture_context_t *)
Definition: vlc_picture.h:73
struct vlc_video_context * vctx
Definition: vlc_picture.h:75
Resource for a picture.
Definition: vlc_picture.h:327
int i_pitch
Number of bytes in a line, including margins.
Definition: vlc_picture.h:338
void * p_sys
Definition: vlc_picture.h:328
uint8_t * p_pixels
Start of the plane's data.
Definition: vlc_picture.h:336
int i_lines
Number of lines, including margins.
Definition: vlc_picture.h:337
Video picture.
Definition: vlc_picture.h:130
unsigned int i_nb_fields
number of displayed fields
Definition: vlc_picture.h:155
picture_context_t * context
video format-specific data pointer
Definition: vlc_picture.h:156
int i_planes
number of allocated planes
Definition: vlc_picture.h:137
bool b_top_field_first
which field is first
Definition: vlc_picture.h:153
struct picture_t * p_next
Next picture in a FIFO a pictures.
Definition: vlc_picture.h:164
vlc_tick_t date
display date
Definition: vlc_picture.h:143
bool b_still
Definition: vlc_picture.h:145
bool b_progressive
is it a progressive frame?
Definition: vlc_picture.h:152
plane_t p[(5)]
description of the planes
Definition: vlc_picture.h:136
void * p_sys
Private data - the video output plugin might want to put stuff here to keep track of the picture.
Definition: vlc_picture.h:161
bool b_multiview_left_eye
left eye or right eye in multiview
Definition: vlc_picture.h:154
video_frame_format_t format
The properties of the picture.
Definition: vlc_picture.h:134
vlc_atomic_rc_t refs
Definition: vlc_picture.h:166
bool b_force
Definition: vlc_picture.h:144
Description of a planar graphic field.
Definition: vlc_picture.h:50
int i_lines
Number of lines, including margins.
Definition: vlc_picture.h:54
int i_visible_pitch
How many bytes for visible pixels are there?
Definition: vlc_picture.h:62
int i_pixel_pitch
Size of a macropixel, defaults to 1.
Definition: vlc_picture.h:58
uint8_t * p_pixels
Start of the plane's data.
Definition: vlc_picture.h:51
int i_visible_lines
How many visible lines are there?
Definition: vlc_picture.h:61
int i_pitch
Number of bytes in a line, including margins.
Definition: vlc_picture.h:55
Definition: ancillary.c:31
Definition: vlc_atomic.h:46
Decoder context struct.
Definition: vlc_codec.h:604
Definition: vlc_frame.h:123
VLC object common members.
Definition: vlc_objects.h:45
picture chaining helpers
Definition: vlc_picture.h:186
picture_t * tail
Definition: vlc_picture.h:188
picture_t * front
Definition: vlc_picture.h:187
Definition: vlc_picture.h:90
void(* destroy)(void *priv)
Definition: vlc_picture.h:91
Definition: decoder_device.c:97
Atomic operations do not require locking, but they are not very powerful.
static bool vlc_atomic_rc_dec(vlc_atomic_rc_t *rc)
Decrement the RC and return true if it reaches 0.
Definition: vlc_atomic.h:66
static void vlc_atomic_rc_inc(vlc_atomic_rc_t *rc)
Increment the RC.
Definition: vlc_atomic.h:57
This file is a collection of common definitions and types.
This file defines the elementary streams format types.
uint32_t vlc_ancillary_id
Definition: vlc_picture.h:38
int64_t vlc_tick_t
High precision date or time interval.
Definition: vlc_tick.h:45