[FFmpeg-devel] [PATCH 1/3] avcodec/v410enc: do not use internal->byte_buffer

Michael Niedermayer michaelni at gmx.at
Mon Jul 6 12:07:53 CEST 2015


it is not optimal when the buffer size is well known at allocation time

This avoids a memcpy()

about 1% faster

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
---
 libavcodec/v410enc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/v410enc.c b/libavcodec/v410enc.c
index f2f7d73..b256a31 100644
--- a/libavcodec/v410enc.c
+++ b/libavcodec/v410enc.c
@@ -50,7 +50,7 @@ static int v410_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
     uint32_t val;
     int i, j, ret;
 
-    if ((ret = ff_alloc_packet2(avctx, pkt, avctx->width * avctx->height * 4)) < 0)
+    if ((ret = ff_alloc_packet2(NULL, pkt, avctx->width * avctx->height * 4)) < 0)
         return ret;
     dst = pkt->data;
 
-- 
1.7.9.5



More information about the ffmpeg-devel mailing list