comparison libswscale/swscale.h @ 31781:036d59b53de2

Revert commit: r31772 | stefano | 2010-07-23 01:01:31 +0200 (Fri, 23 Jul 2010) | 2 lines Prefer impersonal form over third person, for consistency with the rest of FFmpeg. The change was not approved by the maintainer.
author stefano
date Wed, 28 Jul 2010 10:43:02 +0000
parents 8e44769b4b4b
children 2aa88c36f9fc
comparison
equal deleted inserted replaced
31780:d55bcadba17a 31781:036d59b53de2
42 #define LIBSWSCALE_BUILD LIBSWSCALE_VERSION_INT 42 #define LIBSWSCALE_BUILD LIBSWSCALE_VERSION_INT
43 43
44 #define LIBSWSCALE_IDENT "SwS" AV_STRINGIFY(LIBSWSCALE_VERSION) 44 #define LIBSWSCALE_IDENT "SwS" AV_STRINGIFY(LIBSWSCALE_VERSION)
45 45
46 /** 46 /**
47 * Return the LIBSWSCALE_VERSION_INT constant. 47 * Returns the LIBSWSCALE_VERSION_INT constant.
48 */ 48 */
49 unsigned swscale_version(void); 49 unsigned swscale_version(void);
50 50
51 /** 51 /**
52 * Return the libswscale build-time configuration. 52 * Returns the libswscale build-time configuration.
53 */ 53 */
54 const char *swscale_configuration(void); 54 const char *swscale_configuration(void);
55 55
56 /** 56 /**
57 * Return the libswscale license. 57 * Returns the libswscale license.
58 */ 58 */
59 const char *swscale_license(void); 59 const char *swscale_license(void);
60 60
61 /* values for the flags, the stuff on the command line is different */ 61 /* values for the flags, the stuff on the command line is different */
62 #define SWS_FAST_BILINEAR 1 62 #define SWS_FAST_BILINEAR 1
102 #define SWS_CS_SMPTE170M 5 102 #define SWS_CS_SMPTE170M 5
103 #define SWS_CS_SMPTE240M 7 103 #define SWS_CS_SMPTE240M 7
104 #define SWS_CS_DEFAULT 5 104 #define SWS_CS_DEFAULT 5
105 105
106 /** 106 /**
107 * Return a pointer to yuv<->rgb coefficients for the given colorspace 107 * Returns a pointer to yuv<->rgb coefficients for the given colorspace
108 * suitable for sws_setColorspaceDetails(). 108 * suitable for sws_setColorspaceDetails().
109 * 109 *
110 * @param colorspace One of the SWS_CS_* macros. If invalid, 110 * @param colorspace One of the SWS_CS_* macros. If invalid,
111 * SWS_CS_DEFAULT is used. 111 * SWS_CS_DEFAULT is used.
112 */ 112 */
129 } SwsFilter; 129 } SwsFilter;
130 130
131 struct SwsContext; 131 struct SwsContext;
132 132
133 /** 133 /**
134 * Return a positive value if pix_fmt is a supported input format, 0 134 * Returns a positive value if pix_fmt is a supported input format, 0
135 * otherwise. 135 * otherwise.
136 */ 136 */
137 int sws_isSupportedInput(enum PixelFormat pix_fmt); 137 int sws_isSupportedInput(enum PixelFormat pix_fmt);
138 138
139 /** 139 /**
140 * Return a positive value if pix_fmt is a supported output format, 0 140 * Returns a positive value if pix_fmt is a supported output format, 0
141 * otherwise. 141 * otherwise.
142 */ 142 */
143 int sws_isSupportedOutput(enum PixelFormat pix_fmt); 143 int sws_isSupportedOutput(enum PixelFormat pix_fmt);
144 144
145 /** 145 /**
146 * Free the swscaler context swsContext. 146 * Frees the swscaler context swsContext.
147 * If swsContext is NULL, then do nothing. 147 * If swsContext is NULL, then does nothing.
148 */ 148 */
149 void sws_freeContext(struct SwsContext *swsContext); 149 void sws_freeContext(struct SwsContext *swsContext);
150 150
151 /** 151 /**
152 * Allocate and return a SwsContext. You need it to perform 152 * Allocates and returns a SwsContext. You need it to perform
153 * scaling/conversion operations using sws_scale(). 153 * scaling/conversion operations using sws_scale().
154 * 154 *
155 * @param srcW the width of the source image 155 * @param srcW the width of the source image
156 * @param srcH the height of the source image 156 * @param srcH the height of the source image
157 * @param srcFormat the source image format 157 * @param srcFormat the source image format
165 int dstW, int dstH, enum PixelFormat dstFormat, 165 int dstW, int dstH, enum PixelFormat dstFormat,
166 int flags, SwsFilter *srcFilter, 166 int flags, SwsFilter *srcFilter,
167 SwsFilter *dstFilter, const double *param); 167 SwsFilter *dstFilter, const double *param);
168 168
169 /** 169 /**
170 * Scale the image slice in srcSlice and put the resulting scaled 170 * Scales the image slice in srcSlice and puts the resulting scaled
171 * slice in the image in dst. A slice is a sequence of consecutive 171 * slice in the image in dst. A slice is a sequence of consecutive
172 * rows in an image. 172 * rows in an image.
173 * 173 *
174 * Slices have to be provided in sequential order, either in 174 * Slices have to be provided in sequential order, either in
175 * top-bottom or bottom-top order. If slices are provided in 175 * top-bottom or bottom-top order. If slices are provided in
224 * Allocates and returns an uninitialized vector with length coefficients. 224 * Allocates and returns an uninitialized vector with length coefficients.
225 */ 225 */
226 SwsVector *sws_allocVec(int length); 226 SwsVector *sws_allocVec(int length);
227 227
228 /** 228 /**
229 * Return a normalized Gaussian curve used to filter stuff 229 * Returns a normalized Gaussian curve used to filter stuff
230 * quality=3 is high quality, lower is lower quality. 230 * quality=3 is high quality, lower is lower quality.
231 */ 231 */
232 SwsVector *sws_getGaussianVec(double variance, double quality); 232 SwsVector *sws_getGaussianVec(double variance, double quality);
233 233
234 /** 234 /**
235 * Allocate and return a vector with length coefficients, all 235 * Allocates and returns a vector with length coefficients, all
236 * with the same value c. 236 * with the same value c.
237 */ 237 */
238 SwsVector *sws_getConstVec(double c, int length); 238 SwsVector *sws_getConstVec(double c, int length);
239 239
240 /** 240 /**
241 * Allocate and return a vector with just one coefficient, with 241 * Allocates and returns a vector with just one coefficient, with
242 * value 1.0. 242 * value 1.0.
243 */ 243 */
244 SwsVector *sws_getIdentityVec(void); 244 SwsVector *sws_getIdentityVec(void);
245 245
246 /** 246 /**
247 * Scale all the coefficients of a by the scalar value. 247 * Scales all the coefficients of a by the scalar value.
248 */ 248 */
249 void sws_scaleVec(SwsVector *a, double scalar); 249 void sws_scaleVec(SwsVector *a, double scalar);
250 250
251 /** 251 /**
252 * Scale all the coefficients of a so that their sum equals height. 252 * Scales all the coefficients of a so that their sum equals height.
253 */ 253 */
254 void sws_normalizeVec(SwsVector *a, double height); 254 void sws_normalizeVec(SwsVector *a, double height);
255 void sws_convVec(SwsVector *a, SwsVector *b); 255 void sws_convVec(SwsVector *a, SwsVector *b);
256 void sws_addVec(SwsVector *a, SwsVector *b); 256 void sws_addVec(SwsVector *a, SwsVector *b);
257 void sws_subVec(SwsVector *a, SwsVector *b); 257 void sws_subVec(SwsVector *a, SwsVector *b);
258 void sws_shiftVec(SwsVector *a, int shift); 258 void sws_shiftVec(SwsVector *a, int shift);
259 259
260 /** 260 /**
261 * Allocate and return a clone of the vector a, that is a vector 261 * Allocates and returns a clone of the vector a, that is a vector
262 * with the same coefficients as a. 262 * with the same coefficients as a.
263 */ 263 */
264 SwsVector *sws_cloneVec(SwsVector *a); 264 SwsVector *sws_cloneVec(SwsVector *a);
265 265
266 #if LIBSWSCALE_VERSION_MAJOR < 1 266 #if LIBSWSCALE_VERSION_MAJOR < 1
269 */ 269 */
270 attribute_deprecated void sws_printVec(SwsVector *a); 270 attribute_deprecated void sws_printVec(SwsVector *a);
271 #endif 271 #endif
272 272
273 /** 273 /**
274 * Print with av_log() a textual representation of the vector a 274 * Prints with av_log() a textual representation of the vector a
275 * if log_level <= av_log_level. 275 * if log_level <= av_log_level.
276 */ 276 */
277 void sws_printVec2(SwsVector *a, AVClass *log_ctx, int log_level); 277 void sws_printVec2(SwsVector *a, AVClass *log_ctx, int log_level);
278 278
279 void sws_freeVec(SwsVector *a); 279 void sws_freeVec(SwsVector *a);
283 float chromaHShift, float chromaVShift, 283 float chromaHShift, float chromaVShift,
284 int verbose); 284 int verbose);
285 void sws_freeFilter(SwsFilter *filter); 285 void sws_freeFilter(SwsFilter *filter);
286 286
287 /** 287 /**
288 * Check if context can be reused, otherwise reallocate a new 288 * Checks if context can be reused, otherwise reallocates a new
289 * one. 289 * one.
290 * 290 *
291 * If context is NULL, just call sws_getContext() to get a new 291 * If context is NULL, just calls sws_getContext() to get a new
292 * context. Otherwise, check if the parameters are the ones already 292 * context. Otherwise, checks if the parameters are the ones already
293 * saved in context. If that is the case, return the current 293 * saved in context. If that is the case, returns the current
294 * context. Otherwise, free context and get a new context with 294 * context. Otherwise, frees context and gets a new context with
295 * the new parameters. 295 * the new parameters.
296 * 296 *
297 * Be warned that srcFilter and dstFilter are not checked, they 297 * Be warned that srcFilter and dstFilter are not checked, they
298 * are assumed to remain the same. 298 * are assumed to remain the same.
299 */ 299 */
302 int dstW, int dstH, enum PixelFormat dstFormat, 302 int dstW, int dstH, enum PixelFormat dstFormat,
303 int flags, SwsFilter *srcFilter, 303 int flags, SwsFilter *srcFilter,
304 SwsFilter *dstFilter, const double *param); 304 SwsFilter *dstFilter, const double *param);
305 305
306 /** 306 /**
307 * Convert an 8bit paletted frame into a frame with a color depth of 32-bits. 307 * Converts an 8bit paletted frame into a frame with a color depth of 32-bits.
308 * 308 *
309 * The output frame will have the same packed format as the palette. 309 * The output frame will have the same packed format as the palette.
310 * 310 *
311 * @param src source frame buffer 311 * @param src source frame buffer
312 * @param dst destination frame buffer 312 * @param dst destination frame buffer
314 * @param palette array with [256] entries, which must match color arrangement (RGB or BGR) of src 314 * @param palette array with [256] entries, which must match color arrangement (RGB or BGR) of src
315 */ 315 */
316 void sws_convertPalette8ToPacked32(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette); 316 void sws_convertPalette8ToPacked32(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette);
317 317
318 /** 318 /**
319 * Convert an 8bit paletted frame into a frame with a color depth of 24 bits. 319 * Converts an 8bit paletted frame into a frame with a color depth of 24 bits.
320 * 320 *
321 * With the palette format "ABCD", the destination frame ends up with the format "ABC". 321 * With the palette format "ABCD", the destination frame ends up with the format "ABC".
322 * 322 *
323 * @param src source frame buffer 323 * @param src source frame buffer
324 * @param dst destination frame buffer 324 * @param dst destination frame buffer