[vlc-devel] [vlc-commits] avcodec: avoid unneeded memcpy in EncodeVideo/Audio

Ilkka Ollakka ileoo at videolan.org
Tue Feb 14 08:34:08 CET 2012


On Mon, Feb 13, 2012 at 04:29:26PM +0100, Laurent Aimar wrote:
> On Mon, Feb 13, 2012 at 02:28:13PM +0100, Ilkka Ollakka wrote:
> > vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Mon Feb 13 15:26:54 2012 +0200| [38415e9206b58a252474bb93deabbfcba1ad8804] | committer: Ilkka Ollakka

> > avcodec: avoid unneeded memcpy in EncodeVideo/Audio

>  You probably need to add a block_Realloc() call (I didn't see it), otherwise
> way too much memory will be wasted (the same memory than the associated
> raw audio/video).

block_Realloc would do memcpy in that case instead of realloc for
p_buffer so it would be simpler to revert commit in that case. Why does
it actually do block_Alloc and memcpy instead of realloc?

You are right about memory waste. Size of the block memory would be big
compared to encoded block, but what would be the best way to measure if
it does matter? 

I was thinking that with somewhat modern systems, having 1 megabyte
(seems to be case with 720x576 resolution) block would not really show
up anywhere? There is big change that I'm wrong with this ofcourse.

-- 
Ilkka Ollakka
Boston, n.:
	Ludwig van Beethoven being jeered by 50,000 sports fans for
finishing second in the Irish jig competition.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20120214/b5a4e9be/attachment.sig>


More information about the vlc-devel mailing list