~ubuntu-branches/ubuntu/trusty/gst-libav1.0/trusty-proposed

« back to all changes in this revision

Viewing changes to gst-libs/ext/libav/libavutil/pixdesc.h

  • Committer: Package Import Robot
  • Author(s): Sebastian Dröge
  • Date: 2013-09-24 17:07:00 UTC
  • mfrom: (1.1.17) (7.1.9 experimental)
  • Revision ID: package-import@ubuntu.com-20130924170700-4dg62s3pwl0pdakz
Tags: 1.2.0-1
* New upstream stable release:
  + debian/control:
    - Build depend on GStreamer and gst-plugins-base >= 1.2.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
89
89
#define PIX_FMT_HWACCEL   8 ///< Pixel format is an HW accelerated format.
90
90
#define PIX_FMT_PLANAR   16 ///< At least one pixel component is not in the first data plane
91
91
#define PIX_FMT_RGB      32 ///< The pixel format contains RGB-like data (as opposed to YUV/grayscale)
92
 
 
 
92
/**
 
93
 * The pixel format is "pseudo-paletted". This means that Libav treats it as
 
94
 * paletted internally, but the palette is generated by the decoder and is not
 
95
 * stored in the file.
 
96
 */
 
97
#define PIX_FMT_PSEUDOPAL 64
 
98
 
 
99
#define PIX_FMT_ALPHA   128 ///< The pixel format has an alpha channel
 
100
 
 
101
 
 
102
#if FF_API_PIX_FMT_DESC
93
103
/**
94
104
 * The array of all the pixel format descriptors.
95
105
 */
96
106
extern const AVPixFmtDescriptor av_pix_fmt_descriptors[];
 
107
#endif
97
108
 
98
109
/**
99
110
 * Read a line from an image, and write the values of the
142
153
 *
143
154
 * Finally if no pixel format has been found, returns PIX_FMT_NONE.
144
155
 */
145
 
enum PixelFormat av_get_pix_fmt(const char *name);
 
156
enum AVPixelFormat av_get_pix_fmt(const char *name);
146
157
 
147
158
/**
148
159
 * Return the short name for a pixel format, NULL in case pix_fmt is
150
161
 *
151
162
 * @see av_get_pix_fmt(), av_get_pix_fmt_string()
152
163
 */
153
 
const char *av_get_pix_fmt_name(enum PixelFormat pix_fmt);
 
164
const char *av_get_pix_fmt_name(enum AVPixelFormat pix_fmt);
154
165
 
155
166
/**
156
167
 * Print in buf the string corresponding to the pixel format with
162
173
 * corresponding info string, or a negative value to print the
163
174
 * corresponding header.
164
175
 */
165
 
char *av_get_pix_fmt_string (char *buf, int buf_size, enum PixelFormat pix_fmt);
 
176
char *av_get_pix_fmt_string (char *buf, int buf_size, enum AVPixelFormat pix_fmt);
166
177
 
167
178
/**
168
179
 * Return the number of bits per pixel used by the pixel format
174
185
 */
175
186
int av_get_bits_per_pixel(const AVPixFmtDescriptor *pixdesc);
176
187
 
 
188
/**
 
189
 * @return a pixel format descriptor for provided pixel format or NULL if
 
190
 * this pixel format is unknown.
 
191
 */
 
192
const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt);
 
193
 
 
194
/**
 
195
 * Iterate over all pixel format descriptors known to libavutil.
 
196
 *
 
197
 * @param prev previous descriptor. NULL to get the first descriptor.
 
198
 *
 
199
 * @return next descriptor or NULL after the last descriptor
 
200
 */
 
201
const AVPixFmtDescriptor *av_pix_fmt_desc_next(const AVPixFmtDescriptor *prev);
 
202
 
 
203
/**
 
204
 * @return an AVPixelFormat id described by desc, or AV_PIX_FMT_NONE if desc
 
205
 * is not a valid pointer to a pixel format descriptor.
 
206
 */
 
207
enum AVPixelFormat av_pix_fmt_desc_get_id(const AVPixFmtDescriptor *desc);
 
208
 
 
209
/**
 
210
 * Utility function to access log2_chroma_w log2_chroma_h from
 
211
 * the pixel format AVPixFmtDescriptor.
 
212
 *
 
213
 * @param[in]  pix_fmt the pixel format
 
214
 * @param[out] h_shift store log2_chroma_h
 
215
 * @param[out] v_shift store log2_chroma_w
 
216
 *
 
217
 * @return 0 on success, AVERROR(ENOSYS) on invalid or unknown pixel format
 
218
 */
 
219
int av_pix_fmt_get_chroma_sub_sample(enum AVPixelFormat pix_fmt,
 
220
                                     int *h_shift, int *v_shift);
 
221
 
 
222
 
177
223
#endif /* AVUTIL_PIXDESC_H */