linux/drivers/staging/vc04_services/bcm2835-camera/mmal-common.h
<<
>>
Prefs
   1/* SPDX-License-Identifier: GPL-2.0 */
   2/*
   3 * Broadcom BM2835 V4L2 driver
   4 *
   5 * Copyright © 2013 Raspberry Pi (Trading) Ltd.
   6 *
   7 * Authors: Vincent Sanders <vincent.sanders@collabora.co.uk>
   8 *          Dave Stevenson <dsteve@broadcom.com>
   9 *          Simon Mellor <simellor@broadcom.com>
  10 *          Luke Diamand <luked@broadcom.com>
  11 *
  12 * MMAL structures
  13 *
  14 */
  15
  16#define MMAL_FOURCC(a, b, c, d) ((a) | (b << 8) | (c << 16) | (d << 24))
  17#define MMAL_MAGIC MMAL_FOURCC('m', 'm', 'a', 'l')
  18
  19/** Special value signalling that time is not known */
  20#define MMAL_TIME_UNKNOWN BIT_ULL(63)
  21
  22struct mmal_msg_context;
  23
  24/* mapping between v4l and mmal video modes */
  25struct mmal_fmt {
  26        char  *name;
  27        u32   fourcc;          /* v4l2 format id */
  28        int   flags;           /* v4l2 flags field */
  29        u32   mmal;
  30        int   depth;
  31        u32   mmal_component;  /* MMAL component index to be used to encode */
  32        u32   ybbp;            /* depth of first Y plane for planar formats */
  33        bool  remove_padding;  /* Does the GPU have to remove padding,
  34                                * or can we do hide padding via bytesperline.
  35                                */
  36};
  37
  38/* buffer for one video frame */
  39struct mmal_buffer {
  40        /* v4l buffer data -- must be first */
  41        struct vb2_v4l2_buffer  vb;
  42
  43        /* list of buffers available */
  44        struct list_head        list;
  45
  46        void *buffer; /* buffer pointer */
  47        unsigned long buffer_size; /* size of allocated buffer */
  48
  49        struct mmal_msg_context *msg_context;
  50};
  51
  52/* */
  53struct mmal_colourfx {
  54        s32 enable;
  55        u32 u;
  56        u32 v;
  57};
  58