+ +
2da5fe7 OpenAVX v0.2.0 - High-performance open-standard IP audio and video transport suite
saifmukhtar · 2026-11-24
main
| 1 | /* Simple Plugin API */ |
| 2 | /* SPDX-FileCopyrightText: Copyright © 2018 Wim Taymans */ |
| 3 | /* SPDX-License-Identifier: MIT */ |
| 4 | |
| 5 | #ifndef SPA_VIDEO_MULTIVIEW_H |
| 6 | #define SPA_VIDEO_MULTIVIEW_H |
| 7 | |
| 8 | #ifdef __cplusplus |
| 9 | extern "C" { |
| 10 | #endif |
| 11 | |
| 12 | /** |
| 13 | * \addtogroup spa_param |
| 14 | * \{ |
| 15 | */ |
| 16 | |
| 17 | /** |
| 18 | * All possible stereoscopic 3D and multiview representations. |
| 19 | * In conjunction with \ref spa_video_multiview_flags, describes how |
| 20 | * multiview content is being transported in the stream. |
| 21 | */ |
| 22 | enum spa_video_multiview_mode { |
| 23 | /** A special value indicating no multiview information. Used in spa_video_info and other |
| 24 | * places to indicate that no specific multiview handling has been requested or provided. |
| 25 | * This value is never carried on caps. */ |
| 26 | SPA_VIDEO_MULTIVIEW_MODE_NONE = -1, |
| 27 | SPA_VIDEO_MULTIVIEW_MODE_MONO = 0, /**< All frames are monoscopic */ |
| 28 | /* Single view modes */ |
| 29 | SPA_VIDEO_MULTIVIEW_MODE_LEFT, /**< All frames represent a left-eye view */ |
| 30 | SPA_VIDEO_MULTIVIEW_MODE_RIGHT, /**< All frames represent a right-eye view */ |
| 31 | /* Stereo view modes */ |
| 32 | SPA_VIDEO_MULTIVIEW_MODE_SIDE_BY_SIDE, /**< Left and right eye views are provided |
| 33 | * in the left and right half of the frame |
| 34 | * respectively. */ |
| 35 | SPA_VIDEO_MULTIVIEW_MODE_SIDE_BY_SIDE_QUINCUNX, /**< Left and right eye views are provided |
| 36 | * in the left and right half of the |
| 37 | * frame, but have been sampled using |
| 38 | * quincunx method, with half-pixel offset |
| 39 | * between the 2 views. */ |
| 40 | SPA_VIDEO_MULTIVIEW_MODE_COLUMN_INTERLEAVED, /**< Alternating vertical columns of pixels |
| 41 | * represent the left and right eye view |
| 42 | * respectively. */ |
| 43 | SPA_VIDEO_MULTIVIEW_MODE_ROW_INTERLEAVED, /**< Alternating horizontal rows of pixels |
| 44 | * represent the left and right eye view |
| 45 | * respectively. */ |
| 46 | SPA_VIDEO_MULTIVIEW_MODE_TOP_BOTTOM, /**< The top half of the frame contains the |
| 47 | * left eye, and the bottom half the right |
| 48 | * eye. */ |
| 49 | SPA_VIDEO_MULTIVIEW_MODE_CHECKERBOARD, /**< Pixels are arranged with alternating |
| 50 | * pixels representing left and right eye |
| 51 | * views in a checkerboard fashion. */ |
| 52 | /* Padding for new frame packing modes */ |
| 53 | |
| 54 | SPA_VIDEO_MULTIVIEW_MODE_FRAME_BY_FRAME = 32, /**< Left and right eye views are provided |
| 55 | * in separate frames alternately. */ |
| 56 | /* Multiview mode(s) */ |
| 57 | SPA_VIDEO_MULTIVIEW_MODE_MULTIVIEW_FRAME_BY_FRAME, /**< Multipleindependent views are |
| 58 | * provided in separate frames in |
| 59 | * sequence. This method only applies to |
| 60 | * raw video buffers at the moment. |
| 61 | * Specific view identification is via |
| 62 | * metadata on raw video buffers. */ |
| 63 | SPA_VIDEO_MULTIVIEW_MODE_SEPARATED, /**< Multiple views are provided as separate |
| 64 | * \ref spa_data framebuffers attached |
| 65 | * to each \ref spa_buffer, described |
| 66 | * by the metadata */ |
| 67 | /* future expansion for annotated modes */ |
| 68 | }; |
| 69 | |
| 70 | /** |
| 71 | * spa_video_multiview_flags are used to indicate extra properties of a |
| 72 | * stereo/multiview stream beyond the frame layout and buffer mapping |
| 73 | * that is conveyed in the \ref spa_video_multiview_mode. |
| 74 | */ |
| 75 | enum spa_video_multiview_flags { |
| 76 | SPA_VIDEO_MULTIVIEW_FLAGS_NONE = 0, /**< No flags */ |
| 77 | SPA_VIDEO_MULTIVIEW_FLAGS_RIGHT_VIEW_FIRST = (1 << 0), /**< For stereo streams, the normal arrangement |
| 78 | * of left and right views is reversed */ |
| 79 | SPA_VIDEO_MULTIVIEW_FLAGS_LEFT_FLIPPED = (1 << 1), /**< The left view is vertically mirrored */ |
| 80 | SPA_VIDEO_MULTIVIEW_FLAGS_LEFT_FLOPPED = (1 << 2), /**< The left view is horizontally mirrored */ |
| 81 | SPA_VIDEO_MULTIVIEW_FLAGS_RIGHT_FLIPPED = (1 << 3), /**< The right view is vertically mirrored */ |
| 82 | SPA_VIDEO_MULTIVIEW_FLAGS_RIGHT_FLOPPED = (1 << 4), /**< The right view is horizontally mirrored */ |
| 83 | SPA_VIDEO_MULTIVIEW_FLAGS_HALF_ASPECT = (1 << 14), /**< For frame-packed multiview |
| 84 | * modes, indicates that the individual |
| 85 | * views have been encoded with half the true |
| 86 | * width or height and should be scaled back |
| 87 | * up for display. This flag is used for |
| 88 | * overriding input layout interpretation |
| 89 | * by adjusting pixel-aspect-ratio. |
| 90 | * For side-by-side, column interleaved or |
| 91 | * checkerboard packings, the |
| 92 | * pixel width will be doubled. |
| 93 | * For row interleaved and |
| 94 | * top-bottom encodings, pixel height will |
| 95 | * be doubled */ |
| 96 | SPA_VIDEO_MULTIVIEW_FLAGS_MIXED_MONO = (1 << 15), /**< The video stream contains both |
| 97 | * mono and multiview portions, |
| 98 | * signalled on each buffer by the |
| 99 | * absence or presence of a buffer flag. */ |
| 100 | }; |
| 101 | |
| 102 | |
| 103 | /** |
| 104 | * \} |
| 105 | */ |
| 106 | |
| 107 | #ifdef __cplusplus |
| 108 | } /* extern "C" */ |
| 109 | #endif |
| 110 | |
| 111 | #endif /* SPA_VIDEO_MULTIVIEW_H */ |