comparison libswscale/swscale.h @ 32282:606e4157cd4c

Split alloc and init of context so that parameters can be set in the context instead of requireing being passed through function parameters. This also makes sws work with AVOptions.
author michael
date Sun, 26 Sep 2010 19:33:57 +0000
parents 2aa88c36f9fc
children d491698b1162
comparison
equal deleted inserted replaced
32281:adc80f8de1a6 32282:606e4157cd4c
142 * otherwise. 142 * otherwise.
143 */ 143 */
144 int sws_isSupportedOutput(enum PixelFormat pix_fmt); 144 int sws_isSupportedOutput(enum PixelFormat pix_fmt);
145 145
146 /** 146 /**
147 * Alloctaes an empty SwsContext, this must be filled and passed to sws_init_context().
148 * For filling see AVOptions, options.c and sws_setColorspaceDetails().
149 */
150 struct SwsContext *sws_alloc_context(void);
151
152 /**
153 * Initializs the swscaler context sws_context.
154 */
155 int sws_init_context(struct SwsContext *sws_context, SwsFilter *srcFilter, SwsFilter *dstFilter);
156
157 /**
147 * Frees the swscaler context swsContext. 158 * Frees the swscaler context swsContext.
148 * If swsContext is NULL, then does nothing. 159 * If swsContext is NULL, then does nothing.
149 */ 160 */
150 void sws_freeContext(struct SwsContext *swsContext); 161 void sws_freeContext(struct SwsContext *swsContext);
151 162
159 * @param dstW the width of the destination image 170 * @param dstW the width of the destination image
160 * @param dstH the height of the destination image 171 * @param dstH the height of the destination image
161 * @param dstFormat the destination image format 172 * @param dstFormat the destination image format
162 * @param flags specify which algorithm and options to use for rescaling 173 * @param flags specify which algorithm and options to use for rescaling
163 * @return a pointer to an allocated context, or NULL in case of error 174 * @return a pointer to an allocated context, or NULL in case of error
175 * @deprecated use sws_alloc_context() and sws_init_context()
164 */ 176 */
165 struct SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat, 177 struct SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat,
166 int dstW, int dstH, enum PixelFormat dstFormat, 178 int dstW, int dstH, enum PixelFormat dstFormat,
167 int flags, SwsFilter *srcFilter, 179 int flags, SwsFilter *srcFilter,
168 SwsFilter *dstFilter, const double *param); 180 SwsFilter *dstFilter, const double *param);