Mercurial > libavcodec.hg
comparison cscd.c @ 3060:a2f611d6c34d libavcodec
faster copy functions for lzo decoder that also need padding
author | reimar |
---|---|
date | Sun, 22 Jan 2006 19:10:12 +0000 |
parents | 0b546eab515d |
children | c8c591fe26f8 |
comparison
equal
deleted
inserted
replaced
3059:61b4cc042988 | 3060:a2f611d6c34d |
---|---|
230 c->bpp = avctx->bits_per_sample; | 230 c->bpp = avctx->bits_per_sample; |
231 c->pic.data[0] = NULL; | 231 c->pic.data[0] = NULL; |
232 c->linelen = avctx->width * avctx->bits_per_sample / 8; | 232 c->linelen = avctx->width * avctx->bits_per_sample / 8; |
233 c->height = avctx->height; | 233 c->height = avctx->height; |
234 c->decomp_size = c->height * c->linelen; | 234 c->decomp_size = c->height * c->linelen; |
235 c->decomp_buf = av_malloc(c->decomp_size); | 235 c->decomp_buf = av_malloc(c->decomp_size + LZO_OUTPUT_PADDING); |
236 if (!c->decomp_buf) { | 236 if (!c->decomp_buf) { |
237 av_log(avctx, AV_LOG_ERROR, "Can't allocate decompression buffer.\n"); | 237 av_log(avctx, AV_LOG_ERROR, "Can't allocate decompression buffer.\n"); |
238 return 1; | 238 return 1; |
239 } | 239 } |
240 return 0; | 240 return 0; |