Go to the documentation of this file.
26 #define VLC_PICTURE_H 1
59 #define PICTURE_PLANE_MAX (VOUT_MAX_PLANES)
169 return pic->
p_next != NULL;
199 return chain->
front == NULL;
253 if (chain->
front == NULL)
433 int i_override_height,
bool b_crop );
463 #define Y_PIXELS p[Y_PLANE].p_pixels
464 #define Y_PITCH p[Y_PLANE].i_pitch
465 #define U_PIXELS p[U_PLANE].p_pixels
466 #define U_PITCH p[U_PLANE].i_pitch
467 #define V_PIXELS p[V_PLANE].p_pixels
468 #define V_PITCH p[V_PLANE].i_pitch
469 #define A_PIXELS p[A_PLANE].p_pixels
470 #define A_PITCH p[A_PLANE].i_pitch
VLC_EXPORT 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:323
bool b_progressive
is it a progressive frame?
Definition: vlc_picture.h:143
#define VLC_API
Definition: fourcc_gen.c:31
VLC_EXPORT picture_t * picture_NewFromFormat(const video_format_t *p_fmt)
This function will create a new picture using the given format.
video_frame_format_t format
The properties of the picture.
Definition: vlc_picture.h:125
@ A_PLANE
Definition: vlc_picture.h:462
picture chaining helpers
Definition: vlc_picture.h:177
struct picture_buffer_t picture_buffer_t
int i_pixel_pitch
Size of a macropixel, defaults to 1.
Definition: vlc_picture.h:49
static picture_t * vlc_picture_chain_PeekFront(vlc_picture_chain_t *chain)
Peek the front of a picture chain.
Definition: vlc_picture.h:237
@ VLC_VIDEO_CONTEXT_VAAPI
Definition: vlc_picture.h:89
int i_lines
Number of lines, including margins.
Definition: vlc_picture.h:331
static vlc_video_context * picture_GetVideoContext(picture_t *pic)
Definition: vlc_picture.h:160
@ VLC_VIDEO_CONTEXT_NVDEC
Definition: vlc_picture.h:94
#define PICTURE_PLANE_MAX
Maximum number of plane for a picture.
Definition: vlc_picture.h:60
static void vlc_picture_chain_AppendChain(picture_t *chain, picture_t *tail)
Append a picture chain to a picture chain.
Definition: vlc_picture.h:267
void(* destroy)(struct picture_context_t *)
Definition: vlc_picture.h:64
VLC_EXPORT void vlc_video_context_Release(vlc_video_context *)
Definition: decoder_helpers.c:275
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:206
unsigned int i_nb_fields
number of displayed fields
Definition: vlc_picture.h:146
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:251
@ VLC_VIDEO_CONTEXT_D3D11VA
private: d3d11_video_context_t*
Definition: vlc_picture.h:92
struct vlc_video_context * vctx
Definition: vlc_picture.h:66
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:61
VLC_EXPORT 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:462
static void picture_Release(picture_t *picture)
Decrements the picture reference count.
Definition: vlc_picture.h:368
Definition: vlc_picture.h:80
VLC_EXPORT void picture_CopyProperties(picture_t *p_dst, const picture_t *p_src)
This function will copy all picture dynamic properties.
Definition: picture.c:389
@ V_PLANE
Definition: vlc_picture.h:461
VLC_EXPORT vlc_decoder_device * vlc_video_context_HoldDevice(vlc_video_context *)
Get the decoder device used by the device context.
Definition: decoder_helpers.c:287
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:279
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:152
Resource for a picture.
Definition: vlc_picture.h:320
VLC_EXPORT 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:226
vlc_tick_t date
display date
Definition: vlc_picture.h:134
picture_context_t * context
video format-specific data pointer
Definition: vlc_picture.h:147
VLC_EXPORT void picture_CopyPixels(picture_t *p_dst, const picture_t *p_src)
This function will copy the picture pixels.
Definition: picture.c:400
int i_visible_lines
How many visible lines are there?
Definition: vlc_picture.h:52
VLC_EXPORT 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:411
Video picture.
Definition: vlc_picture.h:120
void * p_sys
Definition: vlc_picture.h:322
@ VLC_VIDEO_CONTEXT_NONE
Definition: vlc_picture.h:88
off_t offset
Definition: vlc_picture.h:74
VLC_EXPORT enum vlc_video_context_type vlc_video_context_GetType(const vlc_video_context *)
Definition: decoder_helpers.c:264
struct plane_t plane_t
Description of a planar graphic field.
static void picture_SwapUV(picture_t *picture)
Swap UV planes of a Tri Planars picture.
Definition: vlc_picture.h:478
struct picture_t * p_next
Next picture in a FIFO a pictures.
Definition: vlc_picture.h:155
int i_lines
Number of lines, including margins.
Definition: vlc_picture.h:45
@ VLC_VIDEO_CONTEXT_CVPX
Definition: vlc_picture.h:95
@ VLC_VIDEO_CONTEXT_MMAL
Definition: vlc_picture.h:96
VLC_EXPORT vlc_video_context * vlc_video_context_Hold(vlc_video_context *)
Definition: decoder_helpers.c:269
bool b_multiview_left_eye
left eye or right eye in multiview
Definition: vlc_picture.h:145
VLC_EXPORT 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_helpers.c:238
int i_planes
number of allocated planes
Definition: vlc_picture.h:128
static void vlc_atomic_rc_inc(vlc_atomic_rc_t *rc)
Increment the RC.
Definition: vlc_atomic.h:52
int64_t vlc_tick_t
High precision date or time interval.
Definition: vlc_tick.h:45
int i_pitch
Number of bytes in a line, including margins.
Definition: vlc_picture.h:46
@ VLC_VIDEO_CONTEXT_VDPAU
Definition: vlc_picture.h:90
Decoder context struct.
Definition: vlc_codec.h:566
VLC_EXPORT void picture_Destroy(picture_t *picture)
Destroys a picture without references.
Definition: picture.c:338
@ VLC_VIDEO_CONTEXT_AWINDOW
private: android_video_context_t*
Definition: vlc_picture.h:93
bool b_top_field_first
which field is first
Definition: vlc_picture.h:144
bool b_force
Definition: vlc_picture.h:135
Definition: vlc_picture.h:62
vlc_video_context_type
Decoder device type.
Definition: vlc_picture.h:86
void * base
Definition: vlc_picture.h:72
VLC_EXPORT picture_t * picture_Clone(picture_t *pic)
Perform a shallow picture copy.
Definition: picture.c:453
VLC_EXPORT void plane_CopyPixels(plane_t *p_dst, const plane_t *p_src)
Definition: picture.c:353
vlc_atomic_rc_t refs
Definition: vlc_picture.h:157
struct vlc_pic_chain vlc_picture_chain_t
picture chaining helpers
size_t size
Definition: vlc_picture.h:73
Definition: decoder_helpers.c:228
VLC_EXPORT int picture_Setup(picture_t *, const video_format_t *)
This function will setup all fields of a picture_t without allocating any memory.
Definition: vlc_picture.h:69
VLC_EXPORT void picture_Reset(picture_t *)
This function will reset a picture information (properties and quantizers).
Definition: picture.c:91
VLC object common members.
Definition: vlc_objects.h:43
int i_visible_pitch
How many visible pixels are there?
Definition: vlc_picture.h:53
VLC_EXPORT void * vlc_video_context_GetPrivate(vlc_video_context *, enum vlc_video_context_type)
Definition: decoder_helpers.c:257
Description of a planar graphic field.
Definition: vlc_picture.h:40
bool b_still
Definition: vlc_picture.h:136
uint8_t * p_pixels
Start of the plane's data.
Definition: vlc_picture.h:42
struct picture_context_t picture_context_t
@ Y_PLANE
Definition: vlc_picture.h:459
#define VLC_USED
Definition: fourcc_gen.c:32
@ U_PLANE
Definition: vlc_picture.h:460
void(* destroy)(void *priv)
Definition: vlc_picture.h:82
#define vlc_assert(pred)
Run-time assertion.
Definition: vlc_common.h:271
picture_t * front
Definition: vlc_picture.h:178
@ VLC_VIDEO_CONTEXT_DXVA2
private: d3d9_video_context_t*
Definition: vlc_picture.h:91
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:198
static picture_t * picture_Hold(picture_t *picture)
Increments the picture reference count.
Definition: vlc_picture.h:355
uint8_t * p_pixels
Start of the plane's data.
Definition: vlc_picture.h:330
static bool picture_HasChainedPics(const picture_t *pic)
Check whether a picture has other pictures linked.
Definition: vlc_picture.h:168
int i_pitch
Number of bytes in a line, including margins.
Definition: vlc_picture.h:332
static vlc_picture_chain_t picture_GetAndResetChain(picture_t *pic)
Reset a picture chain.
Definition: vlc_picture.h:291
picture_t * tail
Definition: vlc_picture.h:179
static picture_t * vlc_picture_chain_PopFront(vlc_picture_chain_t *chain)
Pop the front of a picture chain.
Definition: vlc_picture.h:218
int fd
Definition: vlc_picture.h:71
plane_t p[(5)]
description of the planes
Definition: vlc_picture.h:127
Definition: vlc_atomic.h:41
Definition: vlc_block.h:117
uint32_t vlc_fourcc_t
Definition: fourcc_gen.c:33
static void vlc_picture_chain_Init(vlc_picture_chain_t *chain)
Initializes or reset a picture chain.
Definition: vlc_picture.h:187