[FFmpeg-devel] [PATCH] Introduce av_fill_image_planesizes() (was: swscale-test: add md5 output)
Michael Niedermayer
michaelni
Tue Sep 28 17:02:22 CEST 2010
On Sun, Sep 26, 2010 at 06:12:27PM -0300, Ramiro Polla wrote:
> On Wed, Sep 22, 2010 at 6:31 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> > On Wed, Sep 15, 2010 at 07:19:28PM -0300, Ramiro Polla wrote:
>
> >> ?doc/APIchanges ? ? ? | ? ?3 +++
> >> ?libavcore/avcore.h ? | ? ?2 +-
> >> ?libavcore/imgutils.c | ? 23 +++++++++++++++++++----
> >> ?libavcore/imgutils.h | ? 12 ++++++++++++
> >> ?4 files changed, 35 insertions(+), 5 deletions(-)
> >> f781b802c36a7541868bc05f89fcc82aeeadc12c ?add_av_image_fill_planesizes_2.diff
> >> Index: doc/APIchanges
> >> ===================================================================
> >> --- doc/APIchanges ? ?(revision 25126)
> >> +++ doc/APIchanges ? ?(working copy)
> >> @@ -13,6 +13,9 @@ libavutil: ? 2009-03-08
> >>
> >> ?API changes, most recent first:
> >>
> >> +2010-09-xx - rxxxxx - lavcore 0.10.0 - imgutils.h
> >> + ?Add function av_fill_image_planesizes(), declared in libavcore/imgutils.h.
> >> +
> >> ?2010-09-08 - r25076 - lavu 50.26.0 - av_get_cpu_flags()
> >> ? ?Add av_get_cpu_flags().
> >>
> >> Index: libavcore/imgutils.h
> >> ===================================================================
> >> --- libavcore/imgutils.h ? ? ?(revision 25126)
> >> +++ libavcore/imgutils.h ? ? ?(working copy)
> >> @@ -101,6 +101,18 @@ void av_image_copy(uint8_t *dst_data[4], int dst_l
> >> ? ? ? ? ? ? ? ? ? ? enum PixelFormat pix_fmt, int width, int height);
> >>
> >> ?/**
> >> + * Fill plane sizes for an image with pixel format pix_fmt and height height.
> >> + *
> >> + * @param planesizes[4] array to be filled with the size for each image plane
> >> + * @param linesizes[4] the array containing the linesize for each
> >> + * plane, should be filled by av_image_fill_linesizes()
> >> + * @return the size in bytes required for the image buffer, a negative
> >> + * error code in case of failure
> >
> > in/out should be marked with proper syntax
> > something shoudl be said about with what goal it chooses linesizes
> > alignemnt ans such
> >
> > That said iam not too happy about this api bloat with odd wrapers
>
> New patch attached with updated documentation (mentions desired
> linesize instead of telling user to use av_image_fill_liniesizes()).
>
> Getting the plane size from a function is useful to do stuff for each
> plane independently (like allocating or copying memory, or running
> crc) without needing some pix_fmt/chroma-specific code for every code
> that needs this.
> doc/APIchanges | 3 +++
> libavcore/avcore.h | 2 +-
> libavcore/imgutils.c | 23 +++++++++++++++++++----
> libavcore/imgutils.h | 12 ++++++++++++
> 4 files changed, 35 insertions(+), 5 deletions(-)
> 4f384edddbd7d9d02f96b336a0603bbbea9cac5c add_av_image_fill_planesizes_3.diff
ok
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
If a bugfix only changes things apparently unrelated to the bug with no
further explanation, that is a good sign that the bugfix is wrong.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100928/e2510d95/attachment.pgp>
More information about the ffmpeg-devel
mailing list