Browse code

Document sws_getContext().

Originally committed as revision 28535 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale

Stefano Sabatini authored on 2009/02/12 08:42:29
Showing 1 changed files
... ...
@@ -114,6 +114,19 @@ struct SwsContext;
114 114
 
115 115
 void sws_freeContext(struct SwsContext *swsContext);
116 116
 
117
+/**
118
+ * Allocates and returns a SwsContext. You need it to perform
119
+ * scaling/conversion operations using sws_scale().
120
+ *
121
+ * @param srcW the width of the source image
122
+ * @param srcH the height of the source image
123
+ * @param srcFormat the source image format
124
+ * @param dstW the width of the destination image
125
+ * @param dstH the height of the destination image
126
+ * @param dstFormat the destination image format
127
+ * @param flags specify which algorithm and options to use for rescaling
128
+ * @return a pointer to an allocated context, or NULL in case of error
129
+ */
117 130
 struct SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat, int dstW, int dstH, enum PixelFormat dstFormat, int flags,
118 131
                                   SwsFilter *srcFilter, SwsFilter *dstFilter, double *param);
119 132
 int sws_scale(struct SwsContext *context, uint8_t* src[], int srcStride[], int srcSliceY,