[FFmpeg-devel] [PATCH] avcodec/v410enc: Use ff_alloc_packet() instead of ff_alloc_packet2()
Michael Niedermayer
michaelni at gmx.at
Sun Jul 5 23:03:24 CEST 2015
the later 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..5537a12 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_packet(pkt, avctx->width * avctx->height * 4)) < 0)
return ret;
dst = pkt->data;
--
1.7.9.5
More information about the ffmpeg-devel
mailing list