[FFmpeg-devel] [PATCH] Some documentation for swscale.h

Vitor Sessak vitor1001
Sun Feb 8 12:52:10 CET 2009


Stefano Sabatini wrote:
> Hi all, no hurry for reviewing this since I'm still in the process of
> learning how to use properly swscale and there is quite some
> sofistication involved in it, anyway some review would be welcome, and
> I can commit by little steps the various parts as long as they are
> OKed.

Just two points I've just learned:

> +
> +/**
> + * Scales the image slice in \p src and puts the resulting scaled
> + * slice in \p dst. An slice is a sequence of consecutive rows in an
> + * image.
> + *
> + * @param context the scaling context previously created with
> + * sws_getContext()
> + * @param src the pointer to the array of pointers to the planes of
> + * the source image (just one pointer in case of packed data)

This is not correct. src is a pointer to the planes of the source _slice_.

> + * @param srcStride the pointer to the array containing the strides or
> + * linesizes of the source image for each plane (in the case of packed
> + * image formats there is only one linesize).
> + * @param srcSliceY the position of the source slice to process, that
> + * is the number of the first row of the slice
> + * @param srcSliceH the heigth of the slice, that is the number of
> + * rows of the slice
> + * @param dst the pointer to the array containing the pointers to the
> + * data planes of the image (just one pointer in case of packed data)

Maybe reword this to be really clear that it is not pointers to the 
output slice, but to the whole output image.

> + * @param srcStride the pointer to the array containing the strides or
> + * linesizes of the destination image for each plane (in the case of
> + * packed image formats there is only one linesize).
> + * @return the height of the output slice
> + */
>  int sws_scale(struct SwsContext *context, uint8_t* src[], int srcStride[], int srcSliceY,
>                int srcSliceH, uint8_t* dst[], int dstStride[]);
> +

-Vitor




More information about the ffmpeg-devel mailing list