VLC  4.0.0-dev
vlc_picture.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * vlc_picture.h: picture definitions
3  *****************************************************************************
4  * Copyright (C) 1999 - 2009 VLC authors and VideoLAN
5  *
6  * Authors: Vincent Seguin <seguin@via.ecp.fr>
7  * Samuel Hocevar <sam@via.ecp.fr>
8  * Olivier Aubert <oaubert 47 videolan d07 org>
9  *
10  * This program is free software; you can redistribute it and/or modify it
11  * under the terms of the GNU Lesser General Public License as published by
12  * the Free Software Foundation; either version 2.1 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU Lesser General Public License for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public License
21  * along with this program; if not, write to the Free Software Foundation,
22  * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23  *****************************************************************************/
24 
25 #ifndef VLC_PICTURE_H
26 #define VLC_PICTURE_H 1
27 
28 #include <assert.h>
29 #include <vlc_atomic.h>
30 
31 /**
32  * \file
33  * This file defines picture structures and functions in vlc
34  */
35 
36 #include <vlc_es.h>
37 
38 /** Description of a planar graphic field */
39 typedef struct plane_t
40 {
41  uint8_t *p_pixels; /**< Start of the plane's data */
42 
43  /* Variables used for fast memcpy operations */
44  int i_lines; /**< Number of lines, including margins */
45  int i_pitch; /**< Number of bytes in a line, including margins */
46 
47  /** Size of a macropixel, defaults to 1 */
48  int i_pixel_pitch;
49 
50  /* Variables used for pictures with margins */
51  int i_visible_lines; /**< How many visible lines are there? */
52  int i_visible_pitch; /**< How many visible pixels are there? */
53 
54 } plane_t;
55 
56 /**
57  * Maximum number of plane for a picture
58  */
59 #define PICTURE_PLANE_MAX (VOUT_MAX_PLANES)
60 
61 typedef struct picture_context_t
62 {
63  void (*destroy)(struct picture_context_t *);
64  struct picture_context_t *(*copy)(struct picture_context_t *);
67 
68 typedef struct picture_buffer_t
69 {
70  int fd;
71  void *base;
72  size_t size;
73  off_t offset;
75 
78 
80 {
81  void (*destroy)(void *priv);
82 };
83 
84 /** Decoder device type */
86 {
90  VLC_VIDEO_CONTEXT_DXVA2, /**< private: d3d9_video_context_t* */
91  VLC_VIDEO_CONTEXT_D3D11VA, /**< private: d3d11_video_context_t* */
92  VLC_VIDEO_CONTEXT_AWINDOW, /**< private: android_video_context_t* */
96 };
97 
99  enum vlc_video_context_type private_type,
100  size_t private_size,
101  const struct vlc_video_context_operations *);
103 
107 
108 /**
109  * Get the decoder device used by the device context.
110  *
111  * This will increment the refcount of the decoder device.
112  */
114 
115 
116 /**
117  * Video picture
118  */
119 struct picture_t
120 {
121  /**
122  * The properties of the picture
123  */
125 
126  plane_t p[PICTURE_PLANE_MAX]; /**< description of the planes */
127  int i_planes; /**< number of allocated planes */
128 
129  /** \name Picture management properties
130  * These properties can be modified using the video output thread API,
131  * but should never be written directly */
132  /**@{*/
133  vlc_tick_t date; /**< display date */
134  bool b_force;
135  bool b_still;
136  /**@}*/
137 
138  /** \name Picture dynamic properties
139  * Those properties can be changed by the decoder
140  * @{
141  */
142  bool b_progressive; /**< is it a progressive frame? */
143  bool b_top_field_first; /**< which field is first */
144  bool b_multiview_left_eye; /**< left eye or right eye in multiview */
145  unsigned int i_nb_fields; /**< number of displayed fields */
146  picture_context_t *context; /**< video format-specific data pointer */
147  /**@}*/
148 
149  /** Private data - the video output plugin might want to put stuff here to
150  * keep track of the picture */
151  void *p_sys;
152 
153  /** Next picture in a FIFO a pictures */
154  struct picture_t *p_next;
155 
157 };
158 
160 {
161  return pic->context ? pic->context->vctx : NULL;
162 }
163 
164 /**
165  * Check whether a picture has other pictures linked
166  */
167 static inline bool picture_HasChainedPics(const picture_t *pic)
168 {
169  return pic->p_next != NULL;
170 }
171 
172 /**
173  * picture chaining helpers
174  */
175 
176 typedef struct vlc_pic_chain {
180 
181 /**
182  * Initializes or reset a picture chain
183  *
184  * \warning do not call this if the chain still holds pictures, it will leak them.
185  */
186 static inline void vlc_picture_chain_Init(vlc_picture_chain_t *chain)
187 {
188  chain->front = NULL;
189  // chain->tail = NULL not needed
190 }
191 
192 /**
193  * Check whether a picture chain holds pictures or not.
194  *
195  * \return true if it is empty.
196  */
197 static inline bool vlc_picture_chain_IsEmpty(const vlc_picture_chain_t *chain)
198 {
199  return chain->front == NULL;
200 }
201 
202 /**
203  * Check whether a picture chain has more than one picture.
204  */
205 static inline bool vlc_picture_chain_HasNext(const vlc_picture_chain_t *chain)
206 {
207  return !vlc_picture_chain_IsEmpty(chain) && chain->front != chain->tail;
208 }
209 
210 /**
211  * Pop the front of a picture chain.
212  *
213  * The next picture in the chain becomes the front of the picture chain.
214  *
215  * \return the front of the picture chain (the picture itself)
216  */
218 {
219  picture_t *front = chain->front;
220  if (front)
221  {
222  chain->front = front->p_next;
223  // unlink the front picture from the rest of the chain
224  front->p_next = NULL;
225  }
226  return front;
227 }
228 
229 /**
230  * Peek the front of a picture chain.
231  *
232  * The picture chain is unchanged.
233  *
234  * \return the front of the picture chain (the picture itself)
235  */
237 {
238  return chain->front;
239 }
240 
241 /**
242  * Append a picture to a picture chain.
243  *
244  * \param chain the picture chain pointer
245  * \param tail the known tail of the picture chain
246  * \param pic the picture to append to the chain
247  *
248  * \return the new tail of the picture chain
249  */
250 static inline void vlc_picture_chain_Append(vlc_picture_chain_t *chain,
251  picture_t *pic)
252 {
253  if (chain->front == NULL)
254  chain->front = pic;
255  else
256  chain->tail->p_next = pic;
257  // make sure the picture doesn't have chained pics
259  pic->p_next = NULL; // we're appending a picture, not a chain
260  chain->tail = pic;
261 }
262 
263 /**
264  * Append a picture chain to a picture chain.
265  */
266 static inline void vlc_picture_chain_AppendChain(picture_t *chain, picture_t *tail)
267 {
268  chain->p_next = tail;
269 }
270 
271 /**
272  * Copy the picture chain in another picture chain and clear the original
273  * picture chain.
274  *
275  * \param in picture chain to copy and clear
276  * \param out picture chain to copy into
277  */
280 {
281  *out = *in;
283 }
284 
285 /**
286  * Reset a picture chain.
287  *
288  * \return the picture chain that was contained in the picture
289  */
291 {
292  vlc_picture_chain_t chain = { pic->p_next, pic->p_next };
293  while ( chain.tail && chain.tail->p_next ) // find the proper tail
294  chain.tail = chain.tail->p_next;
295  pic->p_next = NULL;
296  return chain;
297 }
298 
299 
300 /**
301  * This function will create a new picture.
302  * The picture created will implement a default release management compatible
303  * with picture_Hold and picture_Release. This default management will release
304  * p_sys, gc.p_sys fields if non NULL.
305  */
306 VLC_API picture_t * picture_New( vlc_fourcc_t i_chroma, int i_width, int i_height, int i_sar_num, int i_sar_den ) VLC_USED;
307 
308 /**
309  * This function will create a new picture using the given format.
310  *
311  * When possible, it is preferred to use this function over picture_New
312  * as more information about the format is kept.
313  */
315 
316 /**
317  * Resource for a picture.
318  */
319 typedef struct
320 {
321  void *p_sys;
322  void (*pf_destroy)(picture_t *);
323 
324  /* Plane resources
325  * XXX all fields MUST be set to the right value.
326  */
327  struct
328  {
329  uint8_t *p_pixels; /**< Start of the plane's data */
330  int i_lines; /**< Number of lines, including margins */
331  int i_pitch; /**< Number of bytes in a line, including margins */
333 
335 
336 /**
337  * This function will create a new picture using the provided resource.
338  */
340 
341 /**
342  * Destroys a picture without references.
343  *
344  * This function destroys a picture with zero references left.
345  * Never call this function directly. Use picture_Release() instead.
346  */
347 VLC_API void picture_Destroy(picture_t *picture);
348 
349 /**
350  * Increments the picture reference count.
351  *
352  * \return picture
353  */
354 static inline picture_t *picture_Hold(picture_t *picture)
355 {
356  vlc_atomic_rc_inc(&picture->refs);
357  return picture;
358 }
359 
360 /**
361  * Decrements the picture reference count.
362  *
363  * If the reference count reaches zero, the picture is destroyed. If it was
364  * allocated from a pool, the underlying picture buffer will be returned to the
365  * pool. Otherwise, the picture buffer will be freed.
366  */
367 static inline void picture_Release(picture_t *picture)
368 {
369  if (vlc_atomic_rc_dec(&picture->refs))
370  picture_Destroy(picture);
371 }
372 
373 /**
374  * This function will copy all picture dynamic properties.
375  */
376 VLC_API void picture_CopyProperties( picture_t *p_dst, const picture_t *p_src );
377 
378 /**
379  * This function will reset a picture information (properties and quantizers).
380  * It is sometimes useful for reusing pictures (like from a pool).
381  */
383 
384 /**
385  * This function will copy the picture pixels.
386  * You can safely copy between pictures that do not have the same size,
387  * only the compatible(smaller) part will be copied.
388  */
389 VLC_API void picture_CopyPixels( picture_t *p_dst, const picture_t *p_src );
390 VLC_API void plane_CopyPixels( plane_t *p_dst, const plane_t *p_src );
391 
392 /**
393  * This function will copy both picture dynamic properties and pixels.
394  * You have to notice that sometime a simple picture_Hold may do what
395  * you want without the copy overhead.
396  * Provided for convenience.
397  *
398  * \param p_dst pointer to the destination picture.
399  * \param p_src pointer to the source picture.
400  */
401 VLC_API void picture_Copy( picture_t *p_dst, const picture_t *p_src );
402 
403 /**
404  * Perform a shallow picture copy
405  *
406  * This function makes a shallow copy of an existing picture. The same planes
407  * and resources will be used, and the cloned picture reference count will be
408  * incremented.
409  *
410  * \return A clone picture on success, NULL on error.
411  */
413 
414 /**
415  * This function will export a picture to an encoded bitstream.
416  *
417  * pp_image will contain the encoded bitstream in psz_format format.
418  *
419  * p_fmt can be NULL otherwise it will be set with the format used for the
420  * picture before encoding.
421  *
422  * i_override_width/height allow to override the width and/or the height of the
423  * picture to be encoded:
424  * - if strictly lower than 0, the original dimension will be used.
425  * - if equal to 0, it will be deduced from the other dimension which must be
426  * different to 0.
427  * - if strictly higher than 0, it will either override the dimension if b_crop
428  * is false, or crop the picture to the provided size if b_crop is true.
429  * If at most one of them is > 0 then the picture aspect ratio will be kept.
430  */
431 VLC_API int picture_Export( vlc_object_t *p_obj, block_t **pp_image, video_format_t *p_fmt,
432  picture_t *p_picture, vlc_fourcc_t i_format, int i_override_width,
433  int i_override_height, bool b_crop );
434 
435 /**
436  * This function will setup all fields of a picture_t without allocating any
437  * memory.
438  * XXX The memory must already be initialized.
439  * It does not need to be released.
440  *
441  * It will return VLC_EGENERIC if the core does not understand the requested
442  * format.
443  *
444  * It can be useful to get the properties of planes.
445  */
447 
448 
449 /*****************************************************************************
450  * Shortcuts to access image components
451  *****************************************************************************/
452 
453 /* Plane indices */
454 enum
455 {
456  Y_PLANE = 0,
457  U_PLANE = 1,
458  V_PLANE = 2,
459  A_PLANE = 3,
460 };
461 
462 /* Shortcuts */
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
471 
472 /**
473  * Swap UV planes of a Tri Planars picture.
474  *
475  * It just swap the planes information without doing any copy.
476  */
477 static inline void picture_SwapUV(picture_t *picture)
478 {
479  vlc_assert(picture->i_planes == 3);
480 
481  plane_t tmp_plane = picture->p[U_PLANE];
482  picture->p[U_PLANE] = picture->p[V_PLANE];
483  picture->p[V_PLANE] = tmp_plane;
484 }
485 
486 /**@}*/
487 
488 #endif /* VLC_PICTURE_H */
picture_New
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
picture_t::b_progressive
bool b_progressive
is it a progressive frame?
Definition: vlc_picture.h:143
vlc_es.h
VLC_API
#define VLC_API
Definition: fourcc_gen.c:31
picture_NewFromFormat
VLC_EXPORT picture_t * picture_NewFromFormat(const video_format_t *p_fmt)
This function will create a new picture using the given format.
picture_t::format
video_frame_format_t format
The properties of the picture.
Definition: vlc_picture.h:125
vlc_pic_chain
picture chaining helpers
Definition: vlc_picture.h:177
picture_buffer_t
struct picture_buffer_t picture_buffer_t
plane_t::i_pixel_pitch
int i_pixel_pitch
Size of a macropixel, defaults to 1.
Definition: vlc_picture.h:49
vlc_picture_chain_PeekFront
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
@ VLC_VIDEO_CONTEXT_VAAPI
Definition: vlc_picture.h:89
picture_resource_t::i_lines
int i_lines
Number of lines, including margins.
Definition: vlc_picture.h:331
picture_GetVideoContext
static vlc_video_context * picture_GetVideoContext(picture_t *pic)
Definition: vlc_picture.h:160
VLC_VIDEO_CONTEXT_NVDEC
@ VLC_VIDEO_CONTEXT_NVDEC
Definition: vlc_picture.h:94
A_PLANE
@ A_PLANE
Definition: vlc_picture.h:462
PICTURE_PLANE_MAX
#define PICTURE_PLANE_MAX
Maximum number of plane for a picture.
Definition: vlc_picture.h:60
vlc_common.h
vlc_picture_chain_AppendChain
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
picture_context_t::destroy
void(* destroy)(struct picture_context_t *)
Definition: vlc_picture.h:64
vlc_video_context_Release
VLC_EXPORT void vlc_video_context_Release(vlc_video_context *)
Definition: decoder_helpers.c:275
vlc_picture_chain_HasNext
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
picture_t::i_nb_fields
unsigned int i_nb_fields
number of displayed fields
Definition: vlc_picture.h:146
vlc_picture_chain_Append
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
@ VLC_VIDEO_CONTEXT_D3D11VA
private: d3d11_video_context_t*
Definition: vlc_picture.h:92
picture_context_t::vctx
struct vlc_video_context * vctx
Definition: vlc_picture.h:66
vlc_atomic_rc_dec
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
picture_Export
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
picture_Release
static void picture_Release(picture_t *picture)
Decrements the picture reference count.
Definition: vlc_picture.h:368
vlc_video_context_operations
Definition: vlc_picture.h:80
picture_CopyProperties
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
video_format_t
video format description
Definition: vlc_es.h:351
vlc_video_context_HoldDevice
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
vlc_picture_chain_GetAndClear
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
picture_t::p_sys
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
picture_resource_t
Resource for a picture.
Definition: vlc_picture.h:320
picture_NewFromResource
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
picture_t::date
vlc_tick_t date
display date
Definition: vlc_picture.h:134
picture_t::context
picture_context_t * context
video format-specific data pointer
Definition: vlc_picture.h:147
picture_CopyPixels
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
plane_t::i_visible_lines
int i_visible_lines
How many visible lines are there?
Definition: vlc_picture.h:52
picture_Copy
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
picture_t
Video picture.
Definition: vlc_picture.h:120
picture_resource_t::p_sys
void * p_sys
Definition: vlc_picture.h:322
VLC_VIDEO_CONTEXT_NONE
@ VLC_VIDEO_CONTEXT_NONE
Definition: vlc_picture.h:88
picture_buffer_t::offset
off_t offset
Definition: vlc_picture.h:74
vlc_video_context_GetType
VLC_EXPORT enum vlc_video_context_type vlc_video_context_GetType(const vlc_video_context *)
Definition: decoder_helpers.c:264
plane_t
struct plane_t plane_t
Description of a planar graphic field.
picture_SwapUV
static void picture_SwapUV(picture_t *picture)
Swap UV planes of a Tri Planars picture.
Definition: vlc_picture.h:478
picture_t::p_next
struct picture_t * p_next
Next picture in a FIFO a pictures.
Definition: vlc_picture.h:155
plane_t::i_lines
int i_lines
Number of lines, including margins.
Definition: vlc_picture.h:45
VLC_VIDEO_CONTEXT_CVPX
@ VLC_VIDEO_CONTEXT_CVPX
Definition: vlc_picture.h:95
VLC_VIDEO_CONTEXT_MMAL
@ VLC_VIDEO_CONTEXT_MMAL
Definition: vlc_picture.h:96
vlc_video_context_Hold
VLC_EXPORT vlc_video_context * vlc_video_context_Hold(vlc_video_context *)
Definition: decoder_helpers.c:269
picture_t::b_multiview_left_eye
bool b_multiview_left_eye
left eye or right eye in multiview
Definition: vlc_picture.h:145
vlc_video_context_Create
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
picture_t::i_planes
int i_planes
number of allocated planes
Definition: vlc_picture.h:128
vlc_atomic_rc_inc
static void vlc_atomic_rc_inc(vlc_atomic_rc_t *rc)
Increment the RC.
Definition: vlc_atomic.h:52
vlc_atomic.h
vlc_tick_t
int64_t vlc_tick_t
High precision date or time interval.
Definition: vlc_tick.h:45
plane_t::i_pitch
int i_pitch
Number of bytes in a line, including margins.
Definition: vlc_picture.h:46
VLC_VIDEO_CONTEXT_VDPAU
@ VLC_VIDEO_CONTEXT_VDPAU
Definition: vlc_picture.h:90
vlc_decoder_device
Decoder context struct.
Definition: vlc_codec.h:566
picture_Destroy
VLC_EXPORT void picture_Destroy(picture_t *picture)
Destroys a picture without references.
Definition: picture.c:338
V_PLANE
@ V_PLANE
Definition: vlc_picture.h:461
VLC_VIDEO_CONTEXT_AWINDOW
@ VLC_VIDEO_CONTEXT_AWINDOW
private: android_video_context_t*
Definition: vlc_picture.h:93
picture_t::b_top_field_first
bool b_top_field_first
which field is first
Definition: vlc_picture.h:144
picture_t::b_force
bool b_force
Definition: vlc_picture.h:135
picture_context_t
Definition: vlc_picture.h:62
vlc_video_context_type
vlc_video_context_type
Decoder device type.
Definition: vlc_picture.h:86
picture_buffer_t::base
void * base
Definition: vlc_picture.h:72
picture_Clone
VLC_EXPORT picture_t * picture_Clone(picture_t *pic)
Perform a shallow picture copy.
Definition: picture.c:453
plane_CopyPixels
VLC_EXPORT void plane_CopyPixels(plane_t *p_dst, const plane_t *p_src)
Definition: picture.c:353
Y_PLANE
@ Y_PLANE
Definition: vlc_picture.h:459
picture_t::refs
vlc_atomic_rc_t refs
Definition: vlc_picture.h:157
vlc_picture_chain_t
struct vlc_pic_chain vlc_picture_chain_t
picture chaining helpers
picture_buffer_t::size
size_t size
Definition: vlc_picture.h:73
vlc_video_context
Definition: decoder_helpers.c:228
picture_Setup
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.
picture_buffer_t
Definition: vlc_picture.h:69
picture_Reset
VLC_EXPORT void picture_Reset(picture_t *)
This function will reset a picture information (properties and quantizers).
Definition: picture.c:91
vlc_object_t
VLC object common members.
Definition: vlc_objects.h:43
plane_t::i_visible_pitch
int i_visible_pitch
How many visible pixels are there?
Definition: vlc_picture.h:53
vlc_video_context_GetPrivate
VLC_EXPORT void * vlc_video_context_GetPrivate(vlc_video_context *, enum vlc_video_context_type)
Definition: decoder_helpers.c:257
plane_t
Description of a planar graphic field.
Definition: vlc_picture.h:40
picture_t::b_still
bool b_still
Definition: vlc_picture.h:136
plane_t::p_pixels
uint8_t * p_pixels
Start of the plane's data.
Definition: vlc_picture.h:42
picture_context_t
struct picture_context_t picture_context_t
VLC_USED
#define VLC_USED
Definition: fourcc_gen.c:32
vlc_video_context_operations::destroy
void(* destroy)(void *priv)
Definition: vlc_picture.h:82
vlc_assert
#define vlc_assert(pred)
Run-time assertion.
Definition: vlc_common.h:271
vlc_pic_chain::front
picture_t * front
Definition: vlc_picture.h:178
VLC_VIDEO_CONTEXT_DXVA2
@ VLC_VIDEO_CONTEXT_DXVA2
private: d3d9_video_context_t*
Definition: vlc_picture.h:91
vlc_picture_chain_IsEmpty
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
picture_Hold
static picture_t * picture_Hold(picture_t *picture)
Increments the picture reference count.
Definition: vlc_picture.h:355
picture_resource_t::p_pixels
uint8_t * p_pixels
Start of the plane's data.
Definition: vlc_picture.h:330
picture_HasChainedPics
static bool picture_HasChainedPics(const picture_t *pic)
Check whether a picture has other pictures linked.
Definition: vlc_picture.h:168
picture_resource_t::i_pitch
int i_pitch
Number of bytes in a line, including margins.
Definition: vlc_picture.h:332
picture_GetAndResetChain
static vlc_picture_chain_t picture_GetAndResetChain(picture_t *pic)
Reset a picture chain.
Definition: vlc_picture.h:291
vlc_pic_chain::tail
picture_t * tail
Definition: vlc_picture.h:179
vlc_picture_chain_PopFront
static picture_t * vlc_picture_chain_PopFront(vlc_picture_chain_t *chain)
Pop the front of a picture chain.
Definition: vlc_picture.h:218
picture_buffer_t::fd
int fd
Definition: vlc_picture.h:71
picture_t::p
plane_t p[(5)]
description of the planes
Definition: vlc_picture.h:127
vlc_atomic_rc_t
Definition: vlc_atomic.h:41
block_t
Definition: vlc_block.h:117
U_PLANE
@ U_PLANE
Definition: vlc_picture.h:460
vlc_fourcc_t
uint32_t vlc_fourcc_t
Definition: fourcc_gen.c:33
p
#define p(t)
vlc_picture_chain_Init
static void vlc_picture_chain_Init(vlc_picture_chain_t *chain)
Initializes or reset a picture chain.
Definition: vlc_picture.h:187