~siretart/ubuntu/utopic/libav/libav10

« back to all changes in this revision

Viewing changes to libavutil/stereo3d.h

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2014-05-11 12:28:45 UTC
  • mfrom: (1.1.22) (2.1.38 experimental)
  • Revision ID: package-import@ubuntu.com-20140511122845-gxvpts83i958y0i5
Tags: 6:10.1-1
* New upstream release 10:
   - pcm-dvd: Fix 20bit decoding (bug/592)
   - avi: Improve non-interleaved detection (bug/666)
   - arm: hpeldsp: fix put_pixels8_y2_{,no_rnd_}armv6
   - arm: hpeldsp: prevent overreads in armv6 asm (bug/646)
   - avfilter: Add missing emms_c when needed
   - rtmpproto: Check the buffer sizes when copying app/playpath strings
   - swscale: Fix an undefined behaviour
   - vp9: Read the frame size as unsigned
   - dcadec: Use correct channel count in stereo downmix check
   - dcadec: Do not decode the XCh extension when downmixing to stereo
   - matroska: add the Opus mapping
   - matroskadec: read the CodecDelay element
   - rtmpproto: Make sure to pass on the error code if read_connect failed
   - lavr: allocate the resampling buffer with a positive size
   - mp3enc: Properly write bitrate value in XING header (Closes: #736088)
   - golomb: Fix the implementation of get_se_golomb_long
* Drop debian/libav-tools.maintscript. ffserver is no longer found in
  stable, and this seems to cause other problems today (Closes: #742676)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (c) 2013 Vittorio Giovara <vittorio.giovara@gmail.com>
 
3
 *
 
4
 * This file is part of Libav.
 
5
 *
 
6
 * Libav 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.
 
10
 *
 
11
 * Libav 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.
 
15
 *
 
16
 * You should have received a copy of the GNU Lesser General Public
 
17
 * License along with Libav; if not, write to the Free Software
 
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 
19
 */
 
20
 
 
21
#include <stdint.h>
 
22
 
 
23
#include "frame.h"
 
24
 
 
25
/**
 
26
 * List of possible 3D Types
 
27
 */
 
28
enum AVStereo3DType {
 
29
    /**
 
30
     * Video is not stereoscopic (and metadata has to be there).
 
31
     */
 
32
    AV_STEREO3D_2D,
 
33
 
 
34
    /**
 
35
     * Views are next to each other.
 
36
     *
 
37
     *    LLLLRRRR
 
38
     *    LLLLRRRR
 
39
     *    LLLLRRRR
 
40
     *    ...
 
41
     */
 
42
    AV_STEREO3D_SIDEBYSIDE,
 
43
 
 
44
    /**
 
45
     * Views are on top of each other.
 
46
     *
 
47
     *    LLLLLLLL
 
48
     *    LLLLLLLL
 
49
     *    RRRRRRRR
 
50
     *    RRRRRRRR
 
51
     */
 
52
    AV_STEREO3D_TOPBOTTOM,
 
53
 
 
54
    /**
 
55
     * Views are alternated temporally.
 
56
     *
 
57
     *     frame0   frame1   frame2   ...
 
58
     *    LLLLLLLL RRRRRRRR LLLLLLLL
 
59
     *    LLLLLLLL RRRRRRRR LLLLLLLL
 
60
     *    LLLLLLLL RRRRRRRR LLLLLLLL
 
61
     *    ...      ...      ...
 
62
     */
 
63
    AV_STEREO3D_FRAMESEQUENCE,
 
64
 
 
65
    /**
 
66
     * Views are packed in a checkerboard-like structure per pixel.
 
67
     *
 
68
     *    LRLRLRLR
 
69
     *    RLRLRLRL
 
70
     *    LRLRLRLR
 
71
     *    ...
 
72
     */
 
73
    AV_STEREO3D_CHECKERBOARD,
 
74
 
 
75
    /**
 
76
     * Views are next to each other, but when upscaling
 
77
     * apply a checkerboard pattern.
 
78
     *
 
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
 
83
     */
 
84
    AV_STEREO3D_SIDEBYSIDE_QUINCUNX,
 
85
 
 
86
    /**
 
87
     * Views are packed per line, as if interlaced.
 
88
     *
 
89
     *    LLLLLLLL
 
90
     *    RRRRRRRR
 
91
     *    LLLLLLLL
 
92
     *    ...
 
93
     */
 
94
    AV_STEREO3D_LINES,
 
95
 
 
96
    /**
 
97
     * Views are packed per column.
 
98
     *
 
99
     *    LRLRLRLR
 
100
     *    LRLRLRLR
 
101
     *    LRLRLRLR
 
102
     *    ...
 
103
     */
 
104
    AV_STEREO3D_COLUMNS,
 
105
};
 
106
 
 
107
 
 
108
/**
 
109
 * Inverted views, Right/Bottom represents the left view.
 
110
 */
 
111
#define AV_STEREO3D_FLAG_INVERT     (1 << 0)
 
112
 
 
113
/**
 
114
 * Stereo 3D type: this structure describes how two videos are packed
 
115
 * within a single video surface, with additional information as needed.
 
116
 *
 
117
 * @note The struct must be allocated with av_stereo3d_alloc() and
 
118
 *       its size is not a part of the public ABI.
 
119
 */
 
120
typedef struct AVStereo3D {
 
121
    /**
 
122
     * How views are packed within the video.
 
123
     */
 
124
    enum AVStereo3DType type;
 
125
 
 
126
    /**
 
127
     * Additional information about the frame packing.
 
128
     */
 
129
    int flags;
 
130
} AVStereo3D;
 
131
 
 
132
/**
 
133
 * Allocate an AVStereo3D structure and set its fields to default values.
 
134
 * The resulting struct can be freed using av_freep().
 
135
 *
 
136
 * @return An AVStereo3D filled with default values or NULL on failure.
 
137
 */
 
138
AVStereo3D *av_stereo3d_alloc(void);
 
139
 
 
140
/**
 
141
 * Allocate a complete AVFrameSideData and add it to the frame.
 
142
 *
 
143
 * @param frame The frame which side data is added to.
 
144
 *
 
145
 * @return The AVStereo3D structure to be filled by caller.
 
146
 */
 
147
AVStereo3D *av_stereo3d_create_side_data(AVFrame *frame);