diff mbox

[FFmpeg-devel] imgutils: Document av_image_get_buffer_size()

Message ID 20170207150152.19867-1-vittorio.giovara@gmail.com
State New
Headers show

Commit Message

Vittorio Giovara Feb. 7, 2017, 3:01 p.m. UTC
---
 libavutil/imgutils.h | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Comments

Michael Niedermayer Feb. 7, 2017, 10:28 p.m. UTC | #1
On Tue, Feb 07, 2017 at 10:01:52AM -0500, Vittorio Giovara wrote:
> ---
>  libavutil/imgutils.h | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/libavutil/imgutils.h b/libavutil/imgutils.h
> index 67063a2..ac1bcb8 100644
> --- a/libavutil/imgutils.h
> +++ b/libavutil/imgutils.h
> @@ -169,7 +169,12 @@ int av_image_fill_arrays(uint8_t *dst_data[4], int dst_linesize[4],
>   * Return the size in bytes of the amount of data required to store an
>   * image with the given parameters.
>   *
> - * @param[in] align the assumed linesize alignment
> + * @param pix_fmt  the pixel format of the image
> + * @param width    the width of the image in pixels
> + * @param height   the height of the image in pixels
> + * @param align    the assumed linesize alignment

> + * @return the size in bytes required for src, a negative error code
> + * in case of failure

There is no "src" in this function or its documentation


>   */
>  int av_image_get_buffer_size(enum AVPixelFormat pix_fmt, int width, int height, int align);

[...]
Michael Niedermayer Feb. 7, 2017, 10:30 p.m. UTC | #2
and the forgotten-CC mail

On Tue, Feb 07, 2017 at 11:28:21PM +0100, Michael Niedermayer wrote:
> On Tue, Feb 07, 2017 at 10:01:52AM -0500, Vittorio Giovara wrote:
> > ---
> >  libavutil/imgutils.h | 7 ++++++-
> >  1 file changed, 6 insertions(+), 1 deletion(-)
> > 
> > diff --git a/libavutil/imgutils.h b/libavutil/imgutils.h
> > index 67063a2..ac1bcb8 100644
> > --- a/libavutil/imgutils.h
> > +++ b/libavutil/imgutils.h
> > @@ -169,7 +169,12 @@ int av_image_fill_arrays(uint8_t *dst_data[4], int dst_linesize[4],
> >   * Return the size in bytes of the amount of data required to store an
> >   * image with the given parameters.
> >   *
> > - * @param[in] align the assumed linesize alignment
> > + * @param pix_fmt  the pixel format of the image
> > + * @param width    the width of the image in pixels
> > + * @param height   the height of the image in pixels
> > + * @param align    the assumed linesize alignment
> 
> > + * @return the size in bytes required for src, a negative error code
> > + * in case of failure
> 
> There is no "src" in this function or its documentation
> 
> 
> >   */
> >  int av_image_get_buffer_size(enum AVPixelFormat pix_fmt, int width, int height, int align);

[...]
Vittorio Giovara Feb. 8, 2017, 2:36 p.m. UTC | #3
On Tue, Feb 7, 2017 at 5:30 PM, Michael Niedermayer
<michael@niedermayer.cc> wrote:
> and the forgotten-CC mail
>
> On Tue, Feb 07, 2017 at 11:28:21PM +0100, Michael Niedermayer wrote:
>> On Tue, Feb 07, 2017 at 10:01:52AM -0500, Vittorio Giovara wrote:
>> > ---
>> >  libavutil/imgutils.h | 7 ++++++-
>> >  1 file changed, 6 insertions(+), 1 deletion(-)
>> >
>> > diff --git a/libavutil/imgutils.h b/libavutil/imgutils.h
>> > index 67063a2..ac1bcb8 100644
>> > --- a/libavutil/imgutils.h
>> > +++ b/libavutil/imgutils.h
>> > @@ -169,7 +169,12 @@ int av_image_fill_arrays(uint8_t *dst_data[4], int dst_linesize[4],
>> >   * Return the size in bytes of the amount of data required to store an
>> >   * image with the given parameters.
>> >   *
>> > - * @param[in] align the assumed linesize alignment
>> > + * @param pix_fmt  the pixel format of the image
>> > + * @param width    the width of the image in pixels
>> > + * @param height   the height of the image in pixels
>> > + * @param align    the assumed linesize alignment
>>
>> > + * @return the size in bytes required for src, a negative error code
>> > + * in case of failure
>>
>> There is no "src" in this function or its documentation

Oh good catch thanks.
I'll replace the @return line to

 * @return the buffer size in bytes, a negative error code in case of failure
diff mbox

Patch

diff --git a/libavutil/imgutils.h b/libavutil/imgutils.h
index 67063a2..ac1bcb8 100644
--- a/libavutil/imgutils.h
+++ b/libavutil/imgutils.h
@@ -169,7 +169,12 @@  int av_image_fill_arrays(uint8_t *dst_data[4], int dst_linesize[4],
  * Return the size in bytes of the amount of data required to store an
  * image with the given parameters.
  *
- * @param[in] align the assumed linesize alignment
+ * @param pix_fmt  the pixel format of the image
+ * @param width    the width of the image in pixels
+ * @param height   the height of the image in pixels
+ * @param align    the assumed linesize alignment
+ * @return the size in bytes required for src, a negative error code
+ * in case of failure
  */
 int av_image_get_buffer_size(enum AVPixelFormat pix_fmt, int width, int height, int align);