2 * Copyright (c) 2013 Vittorio Giovara <vittorio.giovara@gmail.com>
4 * This file is part of FFmpeg.
6 * FFmpeg is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * FFmpeg is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with FFmpeg; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
26 * List of possible 3D Types
30 * Video is not stereoscopic (and metadata has to be there).
35 * Views are next to each other.
42 AV_STEREO3D_SIDEBYSIDE,
45 * Views are on top of each other.
52 AV_STEREO3D_TOPBOTTOM,
55 * Views are alternated temporally.
57 * frame0 frame1 frame2 ...
58 * LLLLLLLL RRRRRRRR LLLLLLLL
59 * LLLLLLLL RRRRRRRR LLLLLLLL
60 * LLLLLLLL RRRRRRRR LLLLLLLL
63 AV_STEREO3D_FRAMESEQUENCE,
66 * Views are packed in a checkerboard-like structure per pixel.
73 AV_STEREO3D_CHECKERBOARD,
76 * Views are next to each other, but when upscaling
77 * apply a checkerboard pattern.
79 * LLLLRRRR L L L L R R R R
80 * LLLLRRRR => L L L L R R R R
81 * LLLLRRRR L L L L R R R R
82 * LLLLRRRR L L L L R R R R
84 AV_STEREO3D_SIDEBYSIDE_QUINCUNX,
87 * Views are packed per line, as if interlaced.
97 * Views are packed per column.
109 * Inverted views, Right/Bottom represents the left view.
111 #define AV_STEREO3D_FLAG_INVERT (1 << 0)
114 * Stereo 3D type: this structure describes how two videos are packed
115 * within a single video surface, with additional information as needed.
117 * @note The struct must be allocated with av_stereo3d_alloc() and
118 * its size is not a part of the public ABI.
120 typedef struct AVStereo3D {
122 * How views are packed within the video.
124 enum AVStereo3DType type;
127 * Additional information about the frame packing.
133 * Allocate an AVStereo3D structure and set its fields to default values.
134 * The resulting struct can be freed using av_freep().
136 * @return An AVStereo3D filled with default values or NULL on failure.
138 AVStereo3D *av_stereo3d_alloc(void);
141 * Allocate a complete AVFrameSideData and add it to the frame.
143 * @param frame The frame which side data is added to.
145 * @return The AVStereo3D structure to be filled by caller.
147 AVStereo3D *av_stereo3d_create_side_data(AVFrame *frame);