[FFmpeg-devel] [PATCH] rawdec: do not unnecessarily allocate full-frame buffer

Michael Niedermayer michaelni
Thu Sep 23 23:28:34 CEST 2010


On Thu, Sep 23, 2010 at 11:22:15PM +0200, Reimar D?ffinger wrote:
> On Tue, Sep 21, 2010 at 07:15:53PM +0100, Reimar D?ffinger wrote:
> > attached patch makes rawdec.c only allocate a buffer if it will
> > actually be used (2 and 4 bpp formats), adding a separate palette
> > to the context for use in the general PAL8 case.
> > make test passes, and I don't think it should break anything,
> > though I'll probably suggest a few more changes in a few days.
> 
> Applied.
> Could someone please check if attached patch fixes the issue
> with the valgrind test?
> It seemed to work for me when I ran valgrind manually on the pixfmt
> tests but I don't know how set up the test to run valgrind as on
> the fate machine.
> In addition I suspect that libavfilter handles paletted formats
> suboptimally by always allocating space for and copying a palette
> (i.e. using PAL8 layout) even when it is a fixed palette like e.g.
> for GRAY8.

>  rawdec.c |    7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> d52d025eb69d8288b9144c2f7ff44e047e8982f4  rawpal.diff

looks good

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

There will always be a question for which you do not know the correct awnser.
-------------- 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/20100923/90db97a3/attachment.pgp>



More information about the ffmpeg-devel mailing list